On Wed, Aug 19, 2026 at 7:13 AM Daniel Gustafsson <[email protected]> wrote:
>
> > On 18 Aug 2026, at 11:55, Bertrand Drouvot <[email protected]> 
> > wrote:
>
> > I don't have more comments, LGTM.
>
> Thanks for review, pushed and backpatched.

Thanks for working on this!

+ /*
+ * Data checksum state at cluster initialization. Since the state can be
+ * changed during runtime, we need to store the initial value for system
+ * functions which report initdb settings.
+ */
+ uint32 data_checksum_version_init;

Do we really need to store this value in pg_control? I wonder how useful
it would be to users.

If data_checksum_version_init is needed only for
pg_control_init().data_page_checksum_version, I'm inclined to think
it isn't worth adding it to pg_control. In that case,
pg_control_init().data_page_checksum_version would also be of little use,
and I think it would be better to remove it rather than change
the meaning of its value.

Instead, how about removing pg_control_init().data_page_checksum_version,
adding a new function such as pg_control_state(), and having it return
the current data_checksum_version? Isn't that be simpler and less confusing?

This would also address two current inconsistencies:

- ControlFile->data_checksum_version is the only one of these values
  not exposed by a SQL function.
- ControlFile->data_checksum_version_init is the only one not shown
  by pg_controldata.

Thoughts?

Regards,

-- 
Fujii Masao


Reply via email to