Contents

Chapter 1

Overview — PostgreSQL Major Upgrade Runbook

A tested, rollback-safe runbook for taking a production PostgreSQL database across

a major version boundary (e.g. 13→16) — the kind of task an agent gets handed

("upgrade our Postgres") and that goes badly without a plan. Covers both the

pg_upgrade (in-place) and logical-replication (near-zero-downtime) paths, with a

pre-flight checklist and a rollback for each.

Two paths — pick by your downtime budget

PathDowntimeComplexityUse when
pg_upgrade --linkminuteslowYou can take a short maintenance window
Logical replicationseconds (cutover only)higherYou need near-zero downtime
Managed (RDS/Cloud SQL)provider-managedlowYou're on a managed service

What's inside

  • UPGRADE-RUNBOOK.md — the full step-by-step for both paths, with exact commands.
  • PRE-FLIGHT-CHECKLIST.md — everything to verify before you touch prod

(extensions, deprecated features, disk, replication slots, pg_upgrade --check).

  • ROLLBACK.md — how to abort safely at each stage.
  • scripts/preflight.sh — runs the read-only pre-flight checks and prints a report.
  • scripts/post_upgrade.sql — the post-upgrade tasks people forget (ANALYZE,

reindex where needed, extension updates, statistics).

The golden rules

1. Back up first, and test the restore — before anything.

2. Run pg_upgrade --check — it catches most blockers before downtime starts.

3. ANALYZE immediately after — the new cluster has no statistics; queries

will be slow and may pick bad plans until you do.

4. Have the rollback ready and rehearsed in staging before prod.

Requirements

PostgreSQL 12+ source; access to run pg_upgrade / manage replication; a staging

copy to rehearse on. preflight.sh needs psql.

Chapter 2
🔒 Available in full product

Pre-Flight Checklist (do all of this before the window)

Chapter 3
🔒 Available in full product

Rollback

Chapter 4
🔒 Available in full product

Upgrade Runbook

You’ve reached the end of the free preview

Get the full PostgreSQL Major Upgrade Runbook and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $29 →
📦 Free sample included — download another copy or visit the store for the full product.
PostgreSQL Major Upgrade Runbook v1.0.0 — Free Preview