pgsql: Handle data_checksum state changes during launcher_exit - Mailing list pgsql-committers

From Daniel Gustafsson
Subject pgsql: Handle data_checksum state changes during launcher_exit
Date
Msg-id E1wIPqk-003SOX-0n@gemulon.postgresql.org
Whole thread
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Amit Kapila
Date:
Subject: pgsql: Fix double table_close of sequence_rel in copy_sequences().
Next
From: Daniel Gustafsson
Date:
Subject: pgsql: Fix data_checksum GUC show_hook