Re: pgsql: Online enabling and disabling of data checksums - Mailing list pgsql-committers

From Daniel Gustafsson
Subject Re: pgsql: Online enabling and disabling of data checksums
Date
Msg-id 97C12A9C-D34F-42BA-936A-32C4E444B500@postgresql.org
Whole thread Raw
In response to Re: pgsql: Online enabling and disabling of data checksums  (Aleksander Alekseev <aleksander@tigerdata.com>)
List pgsql-committers
> On 6 Apr 2026, at 16:39, Aleksander Alekseev <aleksander@tigerdata.com> wrote:
>
> Hi Daniel,
>
>> Online enabling and disabling of data checksums
>>
>> [...]
>
> I noticed a little mistake:

Thanks for looking!

> ```
> /*
> * Await state transition to "on" in all backends. When done we know that
> * data data checksums are both written and verified in all backends.
> */
> ```
>
> The word "data" is repeated twice.

Ugh.

> Also there are inconsistencies in the way
> XLogCtlData->data_checksum_version,
> ControlFileData->data_checksum_version and certain variables are
> assigned. Sometimes a hardcoded 0 is used and sometimes
> PG_DATA_CHECKSUM_OFF. I suggest using values of the enum
> ChecksumStateType for readability / consistency.

PG_DATA_CHECKSUM_OFF didn't exist until quite late in the lifetime of the
patch, and clearly not all uses of 0 were ported over.

> Here are corresponding patches.

I will take another look later today when I have more time, and commit them.

--
Daniel Gustafsson




pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: Add TAP tests for log_lock_waits
Next
From: Robert Haas
Date:
Subject: pgsql: Expose helper functions scan_quoted_identifier and scan_identifi