-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enhance shutdown process for demotion of the cluster #4411
base: main
Are you sure you want to change the base?
Conversation
❗ By default, the pull request is configured to backport to all release branches.
|
/test limit=local |
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/8907157613 |
/test limit=local |
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/8970292966 |
/test limit=local |
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/8981364872 |
/test limit=local |
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/8981390629 |
e66b119
to
657be55
Compare
Closes #3790 Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
// ShutdownCheckpointToken is a json token containing the following information from pg_controldata: | ||
// Database system identifier | ||
// Latest checkpoint's TimeLineID | ||
// Latest checkpoint's REDO location | ||
// Latest checkpoint's REDO WAL file | ||
// Time of latest checkpoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ShutdownCheckpointToken is a json token containing the following information from pg_controldata: | |
// Database system identifier | |
// Latest checkpoint's TimeLineID | |
// Latest checkpoint's REDO location | |
// Latest checkpoint's REDO WAL file | |
// Time of latest checkpoint | |
// shutdownCheckpointToken is a JSON token containing the information | |
// from pg_controldata such as Database system identifier, Latest checkpoint's | |
// TimeLineID, Latest checkpoint's REDO location, Latest checkpoint's REDO | |
// WAL file, and Time of latest checkpoint |
ShutdownCheckpointToken
Cluster
shutdown process for demotion
Cluster
shutdown process for demotion
This patch enhances the shutdown process for demoting a primary cluster in CloudNativePG by:
shutdownCheckpointToken
in theCluster
status, containing information in JSON format retrieved frompg_controldata
. This includes the database system identifier, latest checkpoint'sTimeLineID
, latest checkpoint's REDO location, latest checkpoint's REDO WAL file, and the time of the latest checkpoint..partial
file. This facilitates the controlled promotion of a replica cluster by relying solely on the WAL archive.Note that this implementation does not cover the hibernation case, which will be addressed in a separate patch.
Closes #3790
Closes #4586