How to Upgrade Replication Clusters without Downtime?
summary
PG upgrade remains the fast option for major-version moves (about 7× faster than dump/restore), but until PG17 upgrades require stopping instances, recreating replication slots and subscriptions, and truncating tables. PG17 adds logical replication slots migration and preserves subscription metadata so upgrades no longer force full table copy. New utility PG create subscriber converts a standby into a logical subscriber using recovery_target_lsn/promote and copy_data=off, cutting initial logical-sync time (measured ~7–8× faster on a 5GB/10-table test) and enabling near-zero-downtime cluster upgrades.
AI-written summary · about
chapters (10)
- 0:00Introduction to upgrades
- 1:07What is a database upgrade
- 5:25Types of replication in PostgreSQL
- 11:52Challenges in upgrading replication clusters
- 13:22Upgrading streaming replication till PG16
- 17:59Upgrading logical replication till PG16
- 20:26New logical replication features in PG17
- 23:01PG create subscriber tool in PG17
- 31:22Upgrading replication clusters using PG17 features
- 34:35Summary and key takeaways
related talks
41mOnline Upgrade of replication clusters without downtime
01h 41mPostgreSQL Upgrades with Logical Replication & Minimal Downtime
51mSpeeding up logical replication setup
01h 01mAlways Online or Bust
53mThe journey towards active replication in PostgreSQL
49mHow we execute PG major upgrades at GitLab, with zero downtime.
50mAn ultimate guide to upgrading your PostgreSQL installation
46mAn ultimate guide to upgrading your PostgreSQL installation
