| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Tomas Vondra <tomas(at)vondra(dot)me> |
| Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se>, Ewan Young <kdbase(dot)hack(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: allow spread checkpoints when changing checksums online |
| Date: | 2026-07-11 18:28:37 |
| Message-ID: | CAHGQGwFV1us3KM-8T_Xk_jAq8xeSqx+2c2wsFo51LKSMdWnR1A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Jul 12, 2026 at 2:05 AM Tomas Vondra <tomas(at)vondra(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dmitry Fomin | 2026-07-11 18:42:08 | Re: [PATCH v1 0/7] Wait event timing and tracing instrumentation |
| Previous Message | Nurlan Tulemisov | 2026-07-11 18:26:12 | Re: postgres_fdw: Emit message when batch_size is reduced |