linkend="sql-commit-prepared" endterm="sql-commit-prepared-title">.
- Pgpool is an example of this type of replication.
+ Pgpool and Sequoia are an example of this type of replication.
- Synchonous Multi-Master Replication
+ Synchronous Multi-Master Replication
- In synchonous multi-master replication, each server can accept
+ In synchronous multi-master replication, each server can accept
write requests, and modified data is transmitted from the
original server to every other server before each transaction
commits. Heavy write activity can cause excessive locking,
leading to poor performance. In fact, write performance is
often worse than that of a single server. Read requests can
- be sent to any server. Some implementations use cluster-wide
- shared memory or shared disk to reduce the communication
- overhead. Clustering is best for mostly read workloads, though
- its big advantage is that any server can accept write requests
- — there is no need to partition workloads between master
- and slave servers, and because the data changes are sent from
- one server to another, there is no problem with non-deterministic
+ be sent to any server. Some implementations use shared disk
+ to reduce the communication overhead. Synchronous multi-master
+ replication is best for mostly read workloads, though its big
+ advantage is that any server can accept write requests —
+ there is no need to partition workloads between master and
+ slave servers, and because the data changes are sent from one
+ server to another, there is no problem with non-deterministic
functions like random()>.
For servers that are not regularly connected, like laptops or
remote servers, keeping data consistent among servers is a
- challenge. One simple solution is to allow each server to
- modify the data, and have periodic communication compare
- databases and ask users to resolve any conflicts.
+ challenge. Using asynchronous multi-master replication, each
+ server works independently, and periodically communicates with
+ the other servers to identify conflicting transactions. The
+ conflicts can be resolved by users or conflict resolution rules.
+ rules.