]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix invalid checksum state transition in checkpoints
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Thu, 30 Apr 2026 11:41:48 +0000 (13:41 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Thu, 30 Apr 2026 11:41:48 +0000 (13:41 +0200)
commit25b922ec5825e6938c28cdae718aa70b8f11fd50
treeced8bd42eba042c281489c0f624c469c6b218983
parent8fb8ded8895620809bb71188476fbc2aec0f419d
Fix invalid checksum state transition in checkpoints

Commit 78e950cb8 added checksum state handling to all XLOG_CHECKPOINT
records which caused unnecessary state transitions and emission of
procsignal barriers.  Remove as only the _REDO record need to handle
checksum state.  Barrier emission is also consistently made after
controlfile updates to avoid race conditions.

Additionally, interrupts are held between calling ProcSignalInit and
InitLocalDataChecksumState to remove a window where otherwise invalid
state transitions can happen.

Also remove a pointless assertion on Controlfile which will never hit.

Author: Tomas Vondra <tomas@vondra.me>
Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Reviewed-by: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Discussion: https://postgr.es/m/9197F930-DDEB-4CAC-82A2-16FEC715CCE8@yesql.se
src/backend/access/transam/xlog.c
src/backend/postmaster/auxprocess.c
src/backend/postmaster/datachecksum_state.c
src/backend/utils/init/postinit.c