Blue/Green and Logical Replication Upgrades
PostgreSQL's on-disk format can change between major versions, so you can't just point a new version at the old files.
The classic upgrade paths all need real downtime and are awkward to undo. Logical replication lets you build the new version alongside the old, sync them live, and switch over with almost no outage.
Pro members see the rest of this lesson
- A 4-step state diagram: Build → Sync → Cut over → Keep
- The full mechanism: what PostgreSQL does internally, in source terms
- 1 SQL query you can run, each labelled by how it was verified
- 1 transcript captured on PostgreSQL 17.10
- The closing insight, the mistake it prevents, and what it changes in your work
Card required. Cancel before day 7 and you are not charged.
Check it against the source1 citation in postgres/postgres · file, symbol and line verified on REL_17_STABLE
Primary symbol: CreateInitDecodingContext · line 399
Anchored to postgres/postgres on REL_17_STABLE and cross-checked against the manual for PostgreSQL 15–18. Every query here was run and its output captured on a throwaway PostgreSQL 17.10 lab; corrections are noted inline. Ch. 31 Logical Replication in the official docs →
Connected
Where this lesson sits
What comes before, after, and alongside it.
Same learning track
Finished a free lesson?
Pro opens the rest of the engine course
You felt one mechanism. Pro is the full bodies, interview depth, and the tracks that build on this session.