Re: allow spread checkpoints when changing checksums online - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: allow spread checkpoints when changing checksums online
Date
Msg-id CAHGQGwFV1us3KM-8T_Xk_jAq8xeSqx+2c2wsFo51LKSMdWnR1A@mail.gmail.com
Whole thread
In response to Re: allow spread checkpoints when changing checksums online  (Tomas Vondra <tomas@vondra.me>)
Responses Re: allow spread checkpoints when changing checksums online
List pgsql-hackers
On Sun, Jul 12, 2026 at 2:05 AM Tomas Vondra <tomas@vondra.me> wrote:
> Yep, good catch. I went between true/false defaults a couple times, and
> forgot to update all the places. The v4 fixes this, along with some
> minor comment improvements.

Thanks for the update! I have a few minor comments.

  if (DataChecksumsInProgressOn())
- SetDataChecksumsOff();
+ SetDataChecksumsOff(DataChecksumState->fast_checkpoint);

The comment on DataChecksumsStateStruct says that the struct is
protected by DataChecksumsWorkerLock, and the update of
fast_checkpoint seems to be done while holding that lock.
However, the read here doesn't seem to be protected. Shouldn't this
read also be protected by DataChecksumsWorkerLock?


-        <function>pg_enable_data_checksums</function> (
<optional><parameter>cost_delay</parameter> <type>int</type>,
<parameter>cost_limit</parameter> <type>int</type></optional> )
+        <function>pg_enable_data_checksums</function> (
<optional><parameter>cost_delay</parameter> <type>int</type>
<literal>DEFAULT</literal> <literal>0</literal>,
<parameter>cost_limit</parameter> <type>int</type>
<literal>DEFAULT</literal> <literal>100</literal>,
<parameter>fast</parameter> <type>bool</type>
<literal>DEFAULT</literal> <literal>true</literal></optional> )

Isn't it be better to use "boolean" instead of "bool"? Other function
signatures in the docs seem to use "boolean". Likewise, it might be
better to use "integer" instead of "int" for consistency, here.


   <sect3 id="checksums-online-system-impact">
    <title>Impact on System of Online Operations</title>

Shouldn't this section also mention the checkpoint option?

Regards,

--
Fujii Masao



pgsql-hackers by date:

Previous
From: Nurlan Tulemisov
Date:
Subject: Re: postgres_fdw: Emit message when batch_size is reduced
Next
From: Dmitry Fomin
Date:
Subject: Re: [PATCH v1 0/7] Wait event timing and tracing instrumentation