From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add data_page_checksum_version to pg_control_checkpoint
Date: Tue, 18 Aug 2026 20:40:39 +0000
Message-ID: <E1wwQbu-000000016rN-2NtK@gemulon.postgresql.org> (raw)
Add data_page_checksum_version to pg_control_checkpoint
Commit f19c0eccae added the data_checksum_version to the pg_controldata
output, but omitted a corresponding change to the pg_control_checkpoint
SQL function, which reports the same checkpoint information. The field
is named to match what pg_control_init already reports for consistency.
The integer version reported is an implementation detail which bleeds
through, but it is quite widely used and a more holistic approach to
improving this is left as an excercise for the next major version. The
mapping between states and versions is added to the documentation to
make it easier for users.
Backpatch to v19 where online checksums were introduced.
Author: Ian Barwick <barwick@gmail.com>
Co-authored-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/CAB8KJ=hb765sE8bKC-6sh=Yp3sCjN8xs474yuBrkwyoTM2pgZA@mail.gmail.com
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ec4399642ae94f1ade0c1532fc67146f851c408c
Modified Files
--------------
doc/src/sgml/func/func-info.sgml | 5 +++
doc/src/sgml/wal.sgml | 45 +++++++++++++++++++++++-
src/backend/utils/misc/pg_controldata.c | 9 +++--
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 6 ++--
src/test/modules/test_checksums/t/001_basic.pl | 18 ++++++++++
src/test/modules/test_checksums/t/004_offline.pl | 12 +++++++
7 files changed, 89 insertions(+), 8 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add data_page_checksum_version to pg_control_checkpoint
In-Reply-To: <E1wwQbu-000000016rN-2NtK@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox