PostgreSQL Replication: 20 Pitfalls and Solutions
summary
Covers 20 concrete replication failures and fixes for PostgreSQL binary and logical replication, with examples: lost WAL due to WAL recycling, out‑of‑disk from misused replication slots, stalled archiving, and a recovered two‑phase prepare bug back‑ported to 13/14. Explains when to use archiving plus slots, how to size wal_keep_size and max_replication_slots, when to run pg_rewind vs full base backup, risks of synchronous replication, hot_standby_feedback, and logical streaming (streaming since 14, parallel apply in 16).
AI-written summary · about
chapters (22)
- 0:00Introduction and motivation
- 2:12WAL basics and recycling pitfalls
- 4:43Archiving issues and solutions
- 6:57Replication slots explained
- 9:07Replication slots not replicated
- 10:10Parameter dance and Max connections
- 11:15Switch overs and split brain
- 13:22Timeline switches and PG rewind
- 16:55Autovacuum after switch overs
- 18:42Transaction loss after failover
- 19:25Synchronous replication pitfalls
- 21:15Read-only replicas and consistency
- 24:02Vacuum conflicts in replication
- 27:59Prepared transactions and recovery
- 29:25Hot standby not working
- 33:39Logical replication basics
- 34:43Logical replication conflicts
- 36:29DDL troubles in logical replication
- 37:53Long running transactions and snapshots
- 40:00Max replication slot settings
- 43:32Long transactions in apply
- 46:50Conclusion and long transactions
related talks
51mPostgreSQL Replication Conflicts: Avoiding Pitfalls
51mPostgreSQL Replication Conflicts: Avoiding Pitfalls
42mPostgreSQL Replication Conflicts: Avoiding Pitfalls
22mPostgreSQL Disaster Recovery Fundamentals
22mSecuring Postgres with streaming replication
02h 26mTutorial
53mThe journey towards active replication in PostgreSQL
29mLogical replication theory and concepts
