Server redundancy keeps a PostgreSQL service available by maintaining multiple database servers instead of relying on one production node. Replication allows a standby to take over when the primary fails, avoiding backup-restore delays during outages. section 9.5
A reliable design accounts for PostgreSQL’s single-primary architecture:
- PostgreSQL cannot run two primary servers for the same databases simultaneously; failover promotes a standby to become the new primary. section 9.5
- Use a second standby when redundancy must remain intact while another server undergoes maintenance or permanent failure. section 9.5
- Cascading replication can reduce additional replication and backup load on the primary. section 9.5
Figure 9.3 A sample PostgreSQL HA setup with a cascaded replication for redundancy and backup
Use the topology diagram to compare a primary, multiple standbys, and cascading replication in a PostgreSQL HA arrangement. section 9.5
