Re: Offline data checksum changes can cause incorrect checksum state on standbys

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Offline data checksum changes can cause incorrect checksum state on standbys
Date: 2026-08-31 10:55:01
Message-ID: CAN4CZFNqKg9Ts76r922cKWcOgtH32ocyghQa8NLB-qeCeC1RKg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Yeah, I see your point that the underlying issue is the non WAL logged change.
> My concern was not about a pg_control change in itself, but that addressing this
> case might require further changes to the current pg_control design, which adds
> risk this close to RC1.

(When I read the emails previously I completely missed the part that
in this case it remains a mismatch. Sorry, that was before coffee)

I don't think we can get this completely right without both wal and
pg_control changes (and possibly some extra connection-time
communication between the standby and primary to provide early
reporting instead of delayed in the most common cases)
If we want to move toward the error direction in pg20 (which we
should) we will have to log that an offline change happened.

I attached v6 which for now documents the current behavior as-is, and
other than that I reorganized the test files.

Attachment Content-Type Size
v6-0002-pg_checksums-Refuse-interrupted-transitions-note-.patch application/octet-stream 7.7 KB
v6-0004-pg_combinebackup-Refuse-mixed-data-checksum-state.patch application/octet-stream 9.5 KB
v6-0001-Do-not-adopt-data-checksum-state-from-another-nod.patch application/octet-stream 118.6 KB
v6-0005-doc-Explain-how-offline-and-online-checksum-chang.patch application/octet-stream 4.2 KB
v6-0003-pg_rewind-Check-the-data-checksum-states-of-sourc.patch application/octet-stream 21.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Osama Abdul Qader 2026-08-31 11:10:02 Re: REPACK (ANALYZE) within transaction block segfaults
Previous Message Ewan Young 2026-08-31 10:54:52 Re: pg_upgrade: Test --check with a running source server