Re: Offline data checksum changes can cause incorrect checksum state on standbys - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Offline data checksum changes can cause incorrect checksum state on standbys
Date
Msg-id EEDD4739-9636-4E8B-A363-A79CE957D01D@yesql.se
Whole thread
In response to Re: Offline data checksum changes can cause incorrect checksum state on standbys  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Allow table AMs to define their own reloptions
List pgsql-hackers
> On 7 Sep 2026, at 13:08, Heikki Linnakangas <hlinnaka@iki.fi> wrote:

> Thanks, I started to review this now. I'm still at patch 0001, haven't looked at the rest yet, but some quick
commentson that one: 

Thanks for reviewing!

> Let's add a new 'sect2' for this explanation, and move it after the "Online Enabling of Checksums" section. It's
currentlyplaced under "Offline Enabling of Checksums", but it actually goes into a lot of details of how *online*
checksummingworks, but "Online Enabling of Checksums" is covered in the following paragraph. If you read this in order
likea novel, it feels weird. 
>
> I think these paragraphs could use some copy-editing too. It feels like a pretty deep technical explanation, not very
accessibleto a DBA. Maybe start with "The primary server and replica can have different checksum states". 
>
> (Not new with this patch, but: )

Can, but really really shouldn't =) I'll try to rework the documentation here
to make it less dense.

> The placement of the states in the state diagram on that page looks bizarre. I know it's auto-generated so not sure
there'smuch we can do about it.. but could we, please? Maybe it'd get more clear if you leave 'initdb' out of the
diagram.Or consider some completely different representation. 

I can try, maybe breaking it up into multiple diagrams could help?

> I'm still trying to understand all the different states and interactions between online and offline changes. It's
reallycomplicated :-(. I know it's a tall order, but is there something we could do to make it simpler? 

If there was I'd love to try it, but across the many alteratives tried during
this open item there hasn't been anyhing less complicated which also solves the
problem.  Combining a WAL logged procedure with one that can rewrite the data
directory without any WAL entries at all is inherently complicated.

> Would it help if there was a separate flag in the control file for "checksums enabled in primary" and "checksums
enabledin this replica", for example? 

Not sure I follow, should pg_checksums maintan such a flag or the StartupXLOG?

--
Daniel Gustafsson




Attachment

pgsql-hackers by date:

Previous
From: prankware
Date:
Subject: Re: COALESCE patch
Next
From: Priyanka S
Date:
Subject: Re: [PATCH] Planner support function for generate_subscripts()