| From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pg_control_checkpoint(): add "data_checksum_version" (Pg19)? |
| Date: | 2026-08-19 08:04:37 |
| Message-ID: | 3ADDD7FB-3582-4C2F-B51C-43877500DEEB@yesql.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 19 Aug 2026, at 09:49, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Wed, Aug 19, 2026 at 7:13 AM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>>
>>> On 18 Aug 2026, at 11:55, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> 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?
I don't disagree with this, but I also don't think between beta3 and rc1 is a
good time to remove fields (which have been there for a very long time) from
system info functions. Revisiting this during v20 and cleaning it up seems
like a very good idea though.
--
Daniel Gustafsson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Anthonin Bonnefoy | 2026-08-19 08:11:02 | Re: Compression of bigger WAL records |
| Previous Message | Amit Langote | 2026-08-19 07:57:55 | Re: InvalidateConstraintCacheCallBack() can free fpmeta while it's in use |