- Symptom
- old cluster does not use data checksums but the new one doespg_upgrade --check fails right after initdb of the new 18 cluster
- Cause
- initdb in PostgreSQL 18 enables data checksums by default, and pg_upgrade requires both clusters to match. Clusters created by earlier versions usually have checksums off.
- Fix
- Initialize the new cluster with --no-data-checksums and upgrade. If you want checksums, enable them afterwards with pg_checksums while the server is stopped.
- Apply
initdb --no-data-checksums -D /var/lib/postgresql/18/data pg_upgrade -b /usr/lib/postgresql/17/bin -B /usr/lib/postgresql/18/bin \ -d /var/lib/postgresql/17/main -D /var/lib/postgresql/18/data --check- Affected
- PostgreSQL 18.0 and later (September 2025), upgrading from clusters without checksums
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders