Re: basebackup: do not verify checksums on pages written before enabling checksums

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: basebackup: do not verify checksums on pages written before enabling checksums
Date: 2026-08-15 08:58:53
Message-ID: EAE3764B-123E-4519-ADAE-20E348D7395A@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 15 Aug 2026, at 10:10, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> wrote:
>
>> I had a look and I wonder if the boolean could miss an on->off->on series of
>> changes.
>
> Good catch, I missed that. I checked that on->off works, but
> on->off->on reenables verification and can again see checksum errors.
>
>> Maybe tracking a checksum transition generation/LSN would make this easier to
>> reason about?
>
> That seems like a good idea, that would allow us to remove the static
> variable. v2 attached based on this approach. (the on-off-on issue can
> also be fixed in the original static bool version with slightly more
> changes, we could also go in that direction, but let's first see what
> everyone thinks about this approach)

I prefer this approach, getting rid of the static variable is a neat win. Can
we combine the two tests into a single 010_backup.pl to keep cluster inits
down?

+ * If we weren't told not to verify checksums, and if checksums have been

While not the fault of this patch, I think we should take this opportunity to
remove the double negative and rewrite this to "If we were told to verify
checksums".

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Denis Smirnov 2026-08-15 09:08:18 Re: Batching in executor
Previous Message Daniel Gustafsson 2026-08-15 08:38:51 Re: Clarify or fix SIGINT handling in data checksums launcher