Re: basebackup: do not verify checksums on pages written before enabling checksums - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: basebackup: do not verify checksums on pages written before enabling checksums
Date
Msg-id aoMSMUUcNXJH4Djv@bdtpg
Whole thread
In response to Re: basebackup: do not verify checksums on pages written before enabling checksums  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
Hi,

On Mon, Aug 17, 2026 at 03:15:43PM +0200, Daniel Gustafsson wrote:
> > On 17 Aug 2026, at 14:54, Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote:
> 
> > +$node->stop;
> > +$node->corrupt_page_checksum($fcorrupt, 0);
> > +$node->start;
> > 
> > The test stops and restarts the node before taking the backup, which resets
> > lastChecksumChangeRecPtr.
> > 
> > Should we also test that verification resumes while lastChecksumChangeRecPtr is
> > still set?
> 
> corrupt_page_checksum() only works reliably when the cluster is turned off,

Oh right, Doh, I missed that.

> a
> reliable corrupt-checksum mechanism for an online cluster could for sure be
> done but seems a bit more invasive at this point.

Yeah. Maybe one option could be to add an injection point in verify_page_checksum(),
just after:

  if (!backup_checksums_verifiable(start_lsn))
        return true;

and before pg_checksum_page(), then attach an "error" action for the post transition
backup? That would cover verification resuming while lastChecksumChangeRecPtr is
still set, if we think it is worth testing.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Switch opclass option functions to be STRICT (currently non-STRICT)
Next
From: Matthias van de Meent
Date:
Subject: Re: Reduce WAL volume for heap tuple hint bits