Zero-Downtime PostgreSQL Major Version Upgrade

2025-01-29
Zero-Downtime PostgreSQL Major Version Upgrade

The Instant team shares their experience upgrading PostgreSQL from version 13 to 16 with zero downtime. They tried in-place upgrades and blue-green deployments, but both failed. Their manual approach involved creating a new PostgreSQL 16 replica, gradually switching subscriptions and writes, and cleverly designing an algorithm to ensure zero data loss by briefly pausing new transactions. They encountered challenges like custom function search path issues and sequence data replication problems, sharing valuable lessons learned along the way.

Read more