Menu

pg_upgrade to Postgres 18: data checksum mismatch fix
📰

pg_upgrade to Postgres 18: data checksum mismatch fix

DEV Community: database·R (RYUSLOG DEV)·13 days ago
#63QAoUsa
#devtodatabase#devto#dev#cluster#postgresql
Long article (1521 words) — no AI summary yet.
Reading 0:00
15s threshold

Introduction & Quick Summary

Symptom. pg_upgrade stops before touching a single table:

Performing Consistency Checks ----------------------------- Checking cluster versions ok Checking for hash indexes ok

*failure* Consult the last few lines of "pg_upgrade_server.log" for the probable cause of the failure.

could not connect to source postmaster started with the command: ... -c data_checksums=off

old and new clusters have different checksum settings

Enter fullscreen mode

Exit fullscreen mode

Or the check passes and the restore fails later with primary and foreign key constraints must use deterministic collations .

Cause. PostgreSQL 18 changed initdb : data checksums are on by default, and pg_upgrade requires both clusters to agree on the setting. Almost every cluster created before 18 has checksums off, so the 18 cluster you just initialised does not match the one you are leaving.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.