pgsql: Revert online data checksum transitions

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Revert online data checksum transitions
Date: 2026-09-16 09:06:38
Message-ID: E1x6lbC-00000000Yw0-3JVv@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Revert online data checksum transitions

The feature to enable, or disable, data checksums in an online
cluster saw a number of postcommit fixes during the beta period.
Suspicions were raised about the risk of more issues surfacing
after GA. To avoid shipping code which may have bugs, this
reverts in full, or in part, the following commits:

aaf8b9989f7, cd857dec0e0, 5fee7cab1b8, 25b922ec582, 8fb8ded8895,
b3a37ffbc5b, abac86c7a27, 3a18526e8d6, 01805b7d16b, 343d98c3601,
e469e4784ea, 8d22f523245, e5e1f6dc795, 5ab239c9a90, 0ca1b301059,
9a39056c418, 2018bd61679, 1df361e3d82, bf25e5571b3, 381d19da153,
b120358c612, 07009121c23, d771b0a907e, f19c0eccae9, 0907112d388,
397f0fd06ed, 602f19c84ca, e3a27cad462, 4ae3e98c02c, b364828f825

A few bits remain as they have merit on their own:
* The fix for offline checksums not preserving initial state in
pg_control_init. The test case for this fix has been moved to
src/bin/pg_checksums/t/002_actions.pl to survive the revert
which removed the previous location.
* When a page verification is logged, the additional note which
informs if the buffer will be zeroed out was kept to aid any
debugging around checksum failures.
* The Data Checksum section in the docs was kept, but rewritten
to reflect the current state.
* The enum containing checksum states is kept and some hardcoded
references to the off state (0) are replaced with the label
PG_DATA_CHECKSUM_OFF instead.

Discussion: https://postgr.es/m/E15AC050-C4B5-488D-BB2D-3C7AC9F89EA8@yesql.se
Discussion: https://postgr.es/m/anwm6UPxoVS41QA2@bdtpg
Discussion: https://postgr.es/m/CA+Tgmob9NY6m0YNFTQ4nFH2d0iC9SQRruDYxfndGKKzh8OC80w@mail.gmail.com
Discussion: https://postgr.es/m/E07A611B-9CF3-4FDB-8CE8-A221E39040EC%40yesql.se

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c05d5ce12366f1008e95b09a0a9b08a49818b0e1

Modified Files
--------------
doc/src/sgml/config.sgml | 5 +-
doc/src/sgml/func/func-admin.sgml | 79 -
doc/src/sgml/func/func-info.sgml | 5 -
doc/src/sgml/glossary.sgml | 20 +-
doc/src/sgml/images/Makefile | 1 -
doc/src/sgml/images/datachecksums.gv | 14 -
doc/src/sgml/images/datachecksums.svg | 81 -
doc/src/sgml/monitoring.sgml | 228 +--
doc/src/sgml/ref/pg_basebackup.sgml | 6 -
doc/src/sgml/ref/pg_checksums.sgml | 12 +-
doc/src/sgml/regress.sgml | 14 -
doc/src/sgml/release-19.sgml | 35 -
doc/src/sgml/wal.sgml | 185 +-
src/backend/access/rmgrdesc/xlogdesc.c | 58 +-
src/backend/access/transam/xlog.c | 552 +-----
src/backend/backup/basebackup.c | 90 +-
src/backend/catalog/system_views.sql | 19 -
src/backend/commands/dbcommands.c | 34 -
src/backend/postmaster/Makefile | 1 -
src/backend/postmaster/auxprocess.c | 28 -
src/backend/postmaster/bgworker.c | 9 -
src/backend/postmaster/datachecksum_state.c | 1979 --------------------
src/backend/postmaster/meson.build | 1 -
src/backend/postmaster/postmaster.c | 5 -
src/backend/replication/logical/decode.c | 16 -
src/backend/storage/ipc/procsignal.c | 8 -
src/backend/storage/page/README | 4 +-
src/backend/storage/page/bufpage.c | 18 +-
src/backend/utils/activity/pgstat_backend.c | 2 -
src/backend/utils/activity/pgstat_io.c | 35 -
src/backend/utils/activity/wait_event_names.txt | 3 -
src/backend/utils/adt/pgstatfuncs.c | 8 +-
src/backend/utils/init/miscinit.c | 3 +-
src/backend/utils/init/postinit.c | 30 +-
src/backend/utils/misc/guc_parameters.dat | 6 +-
src/backend/utils/misc/guc_tables.c | 9 +-
src/backend/utils/misc/pg_controldata.c | 9 +-
src/backend/utils/misc/postgresql.conf.sample | 10 +-
src/bin/pg_checksums/t/002_actions.pl | 5 +
src/bin/pg_controldata/pg_controldata.c | 2 -
src/bin/pg_upgrade/controldata.c | 9 -
src/bin/pg_waldump/t/001_basic.pl | 3 +-
src/include/access/rmgrlist.h | 1 -
src/include/access/xlog.h | 20 +-
src/include/access/xlog_internal.h | 6 -
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_control.h | 9 +-
src/include/catalog/pg_proc.dat | 12 -
src/include/commands/progress.h | 16 -
src/include/miscadmin.h | 10 -
src/include/postmaster/datachecksum_state.h | 28 -
src/include/postmaster/proctypelist.h | 2 -
src/include/replication/decode.h | 1 -
src/include/storage/checksum.h | 11 +-
src/include/storage/lwlocklist.h | 1 -
src/include/storage/procsignal.h | 4 -
src/include/storage/subsystemlist.h | 1 -
src/include/utils/backend_progress.h | 1 -
src/test/modules/Makefile | 1 -
src/test/modules/meson.build | 1 -
src/test/modules/test_checksums/.gitignore | 2 -
src/test/modules/test_checksums/Makefile | 36 -
src/test/modules/test_checksums/README | 30 -
src/test/modules/test_checksums/meson.build | 40 -
src/test/modules/test_checksums/t/001_basic.pl | 221 ---
src/test/modules/test_checksums/t/002_restarts.pl | 160 --
.../test_checksums/t/003_standby_restarts.pl | 288 ---
src/test/modules/test_checksums/t/004_offline.pl | 108 --
src/test/modules/test_checksums/t/005_injection.pl | 215 ---
.../modules/test_checksums/t/006_pgbench_single.pl | 285 ---
.../test_checksums/t/007_pgbench_standby.pl | 411 ----
src/test/modules/test_checksums/t/008_pitr.pl | 192 --
src/test/modules/test_checksums/t/009_fpi.pl | 64 -
.../test_checksums/t/010_backup_straddle.pl | 260 ---
.../test_checksums/t/011_standby_straddle.pl | 249 ---
.../test_checksums/t/DataChecksums/Utils.pm | 243 ---
.../modules/test_checksums/test_checksums--1.0.sql | 16 -
src/test/modules/test_checksums/test_checksums.c | 105 --
.../modules/test_checksums/test_checksums.control | 4 -
src/test/regress/expected/rules.out | 38 -
src/test/regress/expected/stats.out | 11 +-
src/tools/pgindent/typedefs.list | 6 -
82 files changed, 79 insertions(+), 6673 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2026-09-16 09:40:03 pgsql: Fix index rebuild progress reporting for REPACK (CONCURRENTLY)
Previous Message Peter Eisentraut 2026-09-16 08:59:17 pgsql: Message style improvement

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-09-16 09:07:04 Re: [PATCH] Release replication slot on error in SQL-callable slot functions
Previous Message Fujii Masao 2026-09-16 09:06:26 Re: pg_createsubscriber does not check output_plugin_libraries