- Mastering PostgreSQL 10
- Hans Jürgen Sch?nig
- 117字
- 2021-06-30 19:03:48
Introducing quorum COMMIT
PostgreSQL has offered support to synchronous replication for quite some time now. Traditionally, only one server could act as a synchronous standby. This has changed. In PostgreSQL 10.0, the community has introduced quorum COMMITs. The idea is actually quite simple. Suppose you want five out of seven servers to confirm a transaction before the master returns a COMMIT. This is exactly what a quorum COMMIT does. It gives the developers and administrators a chance to define what COMMIT does in a more fine-grained way.
To configure quorum COMMITs, the syntax of synchronous_standby_names has been extended. Here are two simple examples:
synchronous_standby_names = ANY 1 (s1, s2) synchronous_standby_names = ANY 2 (s1, s2, s3)