From 656967549059f94d368814034c02f329f0d03e1a Mon Sep 17 00:00:00 2001 From: Sai Pranav Date: Tue, 3 Nov 2026 19:15:16 +0530 Subject: [PATCH v2 1/2] pg_combinebackup: Don't point only to pg_checksums for mixed checksum states When pg_combinebackup refuses a backup chain whose backups were taken under different data checksum states, its hint and the Limitations section of its documentation tell the user to take a new full backup after enabling checksums with pg_checksums. Since checksums can also be enabled online with pg_enable_data_checksums(), the same refusal happens when they were enabled that way, or when an earlier backup was taken while they were still being enabled, and the hint then names a tool the user never ran. Drop the reference to pg_checksums from the hint, and describe both ways of enabling checksums in the documentation, along with the case of a backup taken while checksums were being enabled. --- doc/src/sgml/ref/pg_combinebackup.sgml | 14 ++++++++------ src/bin/pg_combinebackup/pg_combinebackup.c | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/ref/pg_combinebackup.sgml b/doc/src/sgml/ref/pg_combinebackup.sgml index 675b802463..ddc28a3bd9 100644 --- a/doc/src/sgml/ref/pg_combinebackup.sgml +++ b/doc/src/sgml/ref/pg_combinebackup.sgml @@ -305,13 +305,15 @@ PostgreSQL documentation pg_combinebackup does not recompute page checksums when - writing the output directory. It therefore refuses a chain in which some - of the backups used for reconstruction were taken with checksums disabled - but the final backup was taken with checksums enabled: the resulting - directory would contain pages with invalid checksums, and the cluster + writing the output directory. It therefore refuses a chain in which the + final backup was taken with checksums enabled but some of the backups used + for reconstruction were not, because they were taken before checksums + were enabled or while they were still being enabled: the resulting + directory could contain pages with invalid checksums, and the cluster would fail checksum verification as soon as it reads them. Take a new - full backup after enabling data checksums with - . + full backup once data checksums have been enabled, whether offline with + or online (see + ). diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c index 254a27b125..589b5c8e79 100644 --- a/src/bin/pg_combinebackup/pg_combinebackup.c +++ b/src/bin/pg_combinebackup/pg_combinebackup.c @@ -681,7 +681,7 @@ check_control_files(int n_backups, char **backup_dirs) if (data_checksum_mismatch) { pg_log_error("only some backups have checksums enabled"); - pg_log_error_hint("Take a new full backup after changing the data checksum state with pg_checksums."); + pg_log_error_hint("Take a new full backup after changing the data checksum state."); exit(1); } -- 2.50.1 (Apple Git-155)