PostgreSQL · tool · fg-0275

pg_upgrade to PostgreSQL 18 stops with 'old cluster does not use data checksums but the new one does'

old cluster does not use data checksums but the new one does

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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

Affects: PostgreSQL 18.0 and later (September 2025), upgrading from clusters without checksums

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp