February 2020
Intermediate to advanced
734 pages
38h 13m
English
PostgreSQL 9.6 also introduces another important component to a highly available cluster of servers commonly found in the NoSQL world. Of course, we're talking about committing writes to several replicas simultaneously. Version 9.6 changes the syntax for synchronous_standby_names so that it's now possible to specify multiple standby servers as well as how many should be active at once. If we had two replicas, rep1 and rep2, and needed both to always be in sync with the primary, we would modify the parameter accordingly:
synchronous_standby_names = '2 (rep1, rep2)'
We could also have five replicas in the list, and enable three of them or any similar combination. Again, we trade latency for better durability, but ...
Read now
Unlock full access