> On 12 Aug 2026, at 02:29, Fujii Masao <[email protected]> wrote: > > On Tue, Aug 11, 2026 at 11:56 PM Daniel Gustafsson <[email protected]> wrote: >> I'm leaning towards using an integer representation in v19, which is the safe >> option, and rethink it for v20 when we can consider it without any rush. A >> compromise could be do document the integer <=> state name mapping in the >> checksums section in the docs. > > +1 to keep using "version" for now and clarify the mapping in the docs.
I took a stab at fixing this today and in doing so I realized another issue which isn't directly related to online checksums but also affect the offline checksums available in all supported versions. pg_control_init is documented to return the state at cluster initialization, but the checksum version in the controlfile is overwritten when changed, and the original value is lost. The attached 0001 fixes this by adding a new field to the controlfile. I think this should be backpatched to 19, but it could also be argued against that at this point in the cycle since it's a pre-existing regression (especially since it updates the controlfile format). The 0002 use data_page_checksum_version consistently, adds a mapping table to the documentation and fixes the tests. -- Daniel Gustafsson
v4-0001-Record-initial-state-of-data-checksums-in-control.patch
Description: Binary data
v4-0002-Add-data_page_checksum_version-to-pg_control_chec.patch
Description: Binary data
