agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix invalid checksum state transition in checkpoints
Date: Thu, 30 Apr 2026 11:46:34 +0000
Message-ID: <E1wIPqk-003SOa-0q@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/25b922ec5825e6938c28cdae718aa70b8f11fd50

Modified Files
--------------
src/backend/access/transam/xlog.c           | 107 +++++++++-------------------
src/backend/postmaster/auxprocess.c         |  10 +++
src/backend/postmaster/datachecksum_state.c |   8 +--
src/backend/utils/init/postinit.c           |  10 +++
4 files changed, 56 insertions(+), 79 deletions(-)



Message-ID: <E1wIPqk-003SOa-0q@gemulon.postgresql.org>
Permalink:  ../E1wIPqk-003SOa-0q@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wIPqk-003SOa-0q@gemulon.postgresql.org

reply

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: Fix invalid checksum state transition in checkpoints
  In-Reply-To: <E1wIPqk-003SOa-0q@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox