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 <[email protected]>
Reviewed-by: Tomas Vondra <[email protected]>
Reviewed-by: Ayush Tiwari <[email protected]>
Reviewed-by: SATYANARAYANA NARLAPURAM <[email protected]>
Discussion: https://postgr.es/m/[email protected]

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(-)

Reply via email to