pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Record initial state of data checksums in controlfile 2+ messages / 1 participants [nested] [flat]
* pgsql: Record initial state of data checksums in controlfile @ 2026-08-18 20:40 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Daniel Gustafsson @ 2026-08-18 20:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Record initial state of data checksums in controlfile The controlfile records the current state of data checksums, which also used to be the initial state from initdb when checksums could not be altered after initialization. pg_control_init is documented to return information about cluster initialization state, which it no longer will if data checksums have been changed either using the offline tool or with online processing. Fix by adding a new field in the control file which tracks the init value of data checksums, and is left read only after initialization. While this is a regression dating back to when changing checksum state was made possible offline with pg_checksums, it is a control file change so it cannot be backpatched. Backpatch to v19 where online checksums were introduced. Author: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://postgr.es/m/B87ABFBE-A304-4839-8706-C80D73E6BF5C@yesql.se Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/514fb08f51471b47c6d4e059df70be97f61a78cc Modified Files -------------- src/backend/access/transam/xlog.c | 1 + src/backend/utils/misc/pg_controldata.c | 2 +- src/include/catalog/pg_control.h | 10 ++++++++-- src/test/modules/test_checksums/t/001_basic.pl | 23 ++++++++++++++++------- src/test/modules/test_checksums/t/002_restarts.pl | 12 +++++++++++- src/test/modules/test_checksums/t/004_offline.pl | 14 ++++++++++++-- 6 files changed, 49 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Record initial state of data checksums in controlfile @ 2026-08-18 20:41 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Daniel Gustafsson @ 2026-08-18 20:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Record initial state of data checksums in controlfile The controlfile records the current state of data checksums, which also used to be the initial state from initdb when checksums could not be altered after initialization. pg_control_init is documented to return information about cluster initialization state, which it no longer will if data checksums have been changed either using the offline tool or with online processing. Fix by adding a new field in the control file which tracks the init value of data checksums, and is left read only after initialization. While this is a regression dating back to when changing checksum state was made possible offline with pg_checksums, it is a control file change so it cannot be backpatched. Backpatch to v19 where online checksums were introduced. Author: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://postgr.es/m/B87ABFBE-A304-4839-8706-C80D73E6BF5C@yesql.se Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/aaf8b9989f7aaeb6594122caee1eea6c87e10655 Modified Files -------------- src/backend/access/transam/xlog.c | 1 + src/backend/utils/misc/pg_controldata.c | 2 +- src/include/catalog/pg_control.h | 10 ++++++++-- src/test/modules/test_checksums/t/001_basic.pl | 23 ++++++++++++++++------- src/test/modules/test_checksums/t/002_restarts.pl | 12 +++++++++++- src/test/modules/test_checksums/t/004_offline.pl | 14 ++++++++++++-- 6 files changed, 49 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-08-18 20:41 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-08-18 20:40 pgsql: Record initial state of data checksums in controlfile Daniel Gustafsson <dgustafsson@postgresql.org> 2026-08-18 20:41 pgsql: Record initial state of data checksums in controlfile Daniel Gustafsson <dgustafsson@postgresql.org>
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