DEV Community

Prachi
Prachi

Posted on

PostgreSQL Replication (Part 2)

PostgreSQL Replication

Models of PostgreSQL Database Replication :
Single-Master Replication (SMR) : This process replicates modifications to table rows in a selected master database server to one or more replica servers. The replica database's replicated tables are not allowed to accept any changes (apart from those made by the master). Changes are not replicated back to the master server, even if they occur.
Multi-Master Replication (MMR) : This method replicates changes to table rows in multiple designated master databases to the corresponding tables in all other master databases. Conflict resolution techniques are frequently used in this paradigm to prevent issues like multiple main keys.

Classes of PostgreSQL Replication :
Unidirectional Replication : Since in single-master replication data only moves in one direction, from master to replica, single-master replication is often referred to as unidirectional replication.
Bidirectional Replication : On the other side, data from Multi-Master Replication travels both ways and is referred to as bidirectional replication.

Top comments (0)