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

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, 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:10:31
Message-ID: CAN4CZFNN5QSHcqoqC0NYM3GTH62iJ1Wfr1MXRj7W56HQ9EDv1g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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)

Attachment Content-Type Size
0001-basebackup-do-not-verify-checksums-on-pages-from-bef.patch application/octet-stream 18.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bingshuai Li 2026-08-15 08:17:02 Bug in logical decoding with DDL and subtransactions
Previous Message Imran Zaheer 2026-08-15 07:57:15 Failing assertion while taking a restartpoint during crash recovery