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: Handle data_checksum state changes during launcher_exit
Date: Thu, 30 Apr 2026 11:46:34 +0000
Message-ID: <E1wIPqk-003SOX-0n@gemulon.postgresql.org> (raw)

Handle data_checksum state changes during launcher_exit

When erroring out from the datachecksums launcher during data checksum
enabling, before state has transitioned to "on", we revert back to the
"off" state.  Since checksums weren't enabled, there is no use staying
in an inprogress state since the checksum launcher currently doesn't
support restarting from where it left off.  Should restartability get
added in the future, this would need to be revisited.  This state
transition was however missing from the allowed transitions in the
statemachine causing an error.

Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
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/8fb8ded8895620809bb71188476fbc2aec0f419d

Modified Files
--------------
src/backend/access/transam/xlog.c           | 15 ++++++++-------
src/backend/postmaster/datachecksum_state.c | 22 ++++++++++++++++------
2 files changed, 24 insertions(+), 13 deletions(-)



Message-ID: <E1wIPqk-003SOX-0n@gemulon.postgresql.org>
Permalink:  ../E1wIPqk-003SOX-0n@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wIPqk-003SOX-0n@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: Handle data_checksum state changes during launcher_exit
  In-Reply-To: <E1wIPqk-003SOX-0n@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