Check whether an in-place major upgrade is feasible.

Section: Cluster-wide Backup and Migration

Run pg_upgrade check

bash
bash
pg_upgrade --check -b /usr/lib/postgresql/17/bin -B /usr/lib/postgresql/18/bin -d /var/lib/postgresql/17/data -D /var/lib/postgresql/18/data
Explanation

See summary for usage details.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Cluster-wide Backup and Migration
Run pg_upgrade
Perform an in-place major version upgrade.
OpenIn sheetbashsame section
Analyze upgraded cluster
Collect statistics after a fresh restore or upgrade.
OpenIn sheetbashsame section
Dump global objects
Export cluster-wide roles and tablespaces.
OpenIn sheetbashsame section
Dump entire cluster
Dump all databases in one plain SQL file.
OpenIn sheetbashsame section
Physical base backup
Take a physical base backup suitable for replication or disaster recovery.
OpenIn sheetbashsame section
Verify base backup
Verify integrity of a base backup manifest.
OpenIn sheetbashsame section