agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_combinebackup: Refuse mixed data checksum states in a backup
Date: Mon, 14 Sep 2026 13:34:14 +0000
Message-ID: <E1x66p4-00000000I6N-2WVn@gemulon.postgresql.org> (raw)
pg_combinebackup: Refuse mixed data checksum states in a backup chain
check_control_files() detected a chain whose backups were taken under
different data checksum states, warned, and proceeded. The output
directory keeps the last backup's control file, so a full backup taken
with checksums off combined with an incremental taken after an offline
enable produces a cluster whose control file says "on" while most of
its blocks carry no checksums; it starts, and then every connection
dies on the first unchecksummed catalog page. An offline enable
between two backups of a chain is all it takes, since it rewrites
every page without logging anything, so the incremental backup does
not re-ship the pages.
Turn the warning into an error, matching what pg_rewind does for the
equivalent combinations. The check stays asymmetric on purpose: when
the last backup was taken with checksums off, stale checksums from an
earlier backup are never verified, and that chain remains usable.
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/anwm6UPxoVS41QA2@bdtpg
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/724477d67e2307fbaea3452e8b78b87572f2ea02
Modified Files
--------------
doc/src/sgml/ref/pg_combinebackup.sgml | 19 +--
src/bin/pg_combinebackup/pg_combinebackup.c | 14 +-
src/test/modules/test_checksums/meson.build | 1 +
.../test_checksums/t/024_combinebackup_mixed.pl | 146 +++++++++++++++++++++
4 files changed, 167 insertions(+), 13 deletions(-)
Message-ID: <E1x66p4-00000000I6N-2WVn@gemulon.postgresql.org>
Permalink: ../E1x66p4-00000000I6N-2WVn@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x66p4-00000000I6N-2WVn@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pg_combinebackup: Refuse mixed data checksum states in a backup
In-Reply-To: <E1x66p4-00000000I6N-2WVn@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox