Re: pg_control_checkpoint(): add "data_checksum_version" (Pg19)?

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Fujii Masao <masao(dot)fujii(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-18 04:55:51
Message-ID: aoPl1zv8R2mStUMs@bdtpg
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Aug 17, 2026 at 04:38:30PM +0200, Daniel Gustafsson wrote:
> > On 14 Aug 2026, at 16:34, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > Thanks, will fix.
>
> Attached is a rebased patchset for this, which I want to go ahead with.

Thanks! Just 2 comments:

=== 1

+# Make sure pg_control_init reports the initial disabled state
+$result = $node->safe_psql('postgres',
+ 'SELECT data_page_checksum_version FROM pg_control_init();');
+is($result, '0', 'ensure pg_control_init reports disabled state');

This is done before the checksum state changes, when both the initial and current
states are off. So it does not verify that pg_control_init() preserves the initial
value after a state change.

Worth to move it (or add one) here?

"
# Finish test suite by enabling checksums and make sure all data can be read
# back and no processes are left over
enable_data_checksums($node, wait => 'on');
"

=== 2

Also worth checking in 004_offline.pl after,

"
# Enable checksums offline using pg_checksums
$node->stop;
$node->checksum_enable_offline;
$node->start;
"

that pg_control_init() still reports the initial disabled state? That would also
verify for the pg_checksums case.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2026-08-18 04:56:59 Re: Allow a prosupport function to be attached to an aggregate
Previous Message vignesh C 2026-08-18 04:54:25 Re: Support EXCEPT for TABLES IN SCHEMA publications