How we execute PG major upgrades at GitLab, with zero downtime.
summary
Zero downtime means no customer-facing outages while major Postgres upgrades still complete; GitLab moves a physical snapshot to a target cluster, runs pg_upgrade there, then uses logical replication (replication slot + publication) to stream recent writes while the old cluster keeps serving traffic. Sequences get a pragmatic fix—precomputed per-sequence offsets (example: bump sequences by 1,000,000)—and the whole process is automated (Ansible) with staged read-only traffic and careful file sync checks.
AI-written summary · about
chapters (6)
- 0:00Introduction and Strategy
- 24:50Preparing the Environment
- 26:04Executing the Upgrade
- 31:48Switchover and Verification
- 38:33Post-Upgrade Analysis
- 41:45Future Improvements & Q&A
related talks
01h 01mAlways Online or Bust
36mHow to Upgrade Replication Clusters without Downtime?
50mAn ultimate guide to upgrading your PostgreSQL installation
01h 41mPostgreSQL Upgrades with Logical Replication & Minimal Downtime
32mPostgreSQL Major Upgrades: Swapping the Elephant Without Breaking the Room
46mAn ultimate guide to upgrading your PostgreSQL installation
26mMastering Large-Scale PostgreSQL Migration
41mOnline Upgrade of replication clusters without downtime
