Databases · Senior · Question 47 of 75
How can you do a major PostgreSQL version upgrade with minimal downtime?
- 1Install the new version over the old files and restart
- 2Dump and restore during business hours
- ✓Correct answer: Set up a new cluster on the new version, replicate with logical replication, then switch traffic over
Explanation
pg_upgrade is fast but needs downtime. Logical replication keeps the old cluster running until the cutover; sequences and DDL need extra care.