TLDR Web Dev · ARTICLES & TUTORIALS

ZERO DOWNTIME POSTGRES UPGRADES

knock.app29 min read

Summary from the TLDR Web Dev newsletter

Knock’s team successfully upgraded from PostgreSQL 11.9 to 15.3 with zero downtime using logical replication and various tools. They were able to de-risk the upgrade process by monitoring it closely and having carefully planned processes in place. This article explains different options for upgrading PostgreSQL, including in-place upgrades (not suitable for zero downtime), and replication-based upgrades, which is what they chose. A replication-based upgrade involves setting up publications and subscriptions, adding tables incrementally, and carefully configuring source and destination databases.