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

From Daniel Gustafsson
Subject Re: basebackup: do not verify checksums on pages written before enabling checksums
Date
Msg-id 04204C86-484F-41FD-A3A0-E100F82313D4@yesql.se
Whole thread
In response to Re: basebackup: do not verify checksums on pages written before enabling checksums  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
> On 18 Aug 2026, at 14:42, Daniel Gustafsson <daniel@yesql.se> wrote:
>
>> On 18 Aug 2026, at 14:39, Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote:
>
>> Shouldn't hit be incremented only when the injection point is attached?
>
> Good point, will fix.
>
>> +  checksum ^= checksum;
>>
>> That's same as "checksum =  0". That works because 0 is not a valid value but
>> was the intend to "checksum ^= 1"? to express that we want a different checksum?
>
> Ugh, sorry, I didn't notice that I hadn't replaced my debugcode before
> generating the patch, I blame the lack of caffeine this morning.

I ended up settling for setting the checksum to zero since it also makes the
checksum predictable, and with that pushed and backpatched.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: pg_control_checkpoint(): add "data_checksum_version" (Pg19)?
Next
From: Michael Paquier
Date:
Subject: Re: Fix a relcache reference leak in reorderbuffer.c