PostgreSQL High Availability: The Considerations and the Candidates
summary
Defines HA by concrete RPO/RTO targets, compares actual tools and tradeoffs, and shows what each needs to run. Notes Patroni + etcd leader lock as the popular but config-heavy template; says repmgr requires rsync and passwordless SSH and embeds in Postgres; flags PG Bouncer is single-threaded unless kernel SO_REUSEPORT and describes pg_stat_monitor as a released Percona observability extension. Gives enough to pick a candidate by operational constraints and failure-recovery behavior.
AI-written summary · about
chapters (18)
- 0:00Intro
- 0:27About Myself More than two decades of professional software development • I'm part of Percona's PostgreSQL Engineering team
- 2:40Initial Thoughts . There are no good or bad HA solutions. There are suitable, unsuitable ones.
- 3:18Presentation Outline • Architectural Considerations
- 4:24Why High Availability is Needed? "High Availability" system ensures service continuity
- 7:11RPO: Recovery Point Objective Recovery point objective is the acceptable data loss. • What is the acceptable data loss in case of failure?
- 8:36RTO: Recovery Time Objective • Acceptable service down time after the incident has occurred. Service downtime during the recovery phase. • Considerations
- 11:12How Many PostgreSQL Instances? • Quorum size?
- 12:46The Dreaded Split Brain and Cluster Degradation • Cluster with a single primary can end up with multiple ones.
- 14:31Multi-Primary Cluster Considerations Is logical replication an option? • Proprietary solutions available
- 16:17Configuration Hardware configuration
- 17:30Fixing Cache Poisoning Should you immediately restart after a PostgreSQL crash? This is a good practice, however, it becomes a consideration with an HA system where you want to prevent unnecessary auto-scaling
- 18:55Fixing Rogue Connections • Long running queries can become a pain
- 23:03Performing Upgrades • Minor upgrades
- 24:42Virtual IP Address and Domain Name Reassignment • ip command Use it to release and assign the IP address to a new system. • arp command Let the network know about the reassignment • DNS changes
- 25:48HAProxy - Load Balancer • Simple to install
- 27:49PgBouncer - Connection Pooler • Configuring Pgbouncer
- 39:57RepMgr - Workings Setup
related talks
36mDesigning Layered High‑Availability Architectures for PostgreSQL on a Budget
46mDeploying Maximum HA Architecture With Postgres
57mReliability features in Postgres Pro
50mEvolution Of PostgreSQL Replication and High Availability (upto ~ 99.999%)
55mHigh Availability with PostgreSQL and Pacemaker
52mOverview of Solutions for PostgreSQL High Availability
50mMoving from MSSQL to pgSQL – High Availability and Disaster Recovery
13mBuilding reliable infrastructure with Postgres
