You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Add shutdownCheckpointToken in the status after fencing/hibernating #3790
Is there an existing issue already for this feature request/idea?
I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated.
What problem is this feature going to solve? Why should it be added?
When fencing or hibernating a Postgres cluster, it would be handy to add in the status a token containing information about write-ahead logging and checkpoint processing.
Describe the solution you'd like
We should add a new field in the status called shutdownCheckpointToken that is normally empty.
Following a fencing operation (and consequently hibernation too), shutdownCheckpointToken is an encoded string 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
The above values must be taken when the Database cluster state is shut down.
Describe alternatives you've considered
N/A
Additional context
N/A
Backport?
Yes
Are you willing to actively contribute to this feature?
changed the title [-][Feature]: Add `checkpointToken` in the status after fencing/hibernating[/-][+][Feature]: Add `shutdownCheckpointToken` in the status after fencing/hibernating[/+]on Feb 26, 2024
Given that all the features related to switchover to a replica cluster are landing at the same time on version 1.24.0, it is IMHO unnecessary to introduce a gradual introduction of the feature that involves both fencing and hibernation. We should just update the status when demotion is requested. Thoughts @leonardoce@armru@fcanovai@mnencia?
+1. If we have a single, fast and easy procedure to demote a cluster and promote the replica one it will be easier from everyone. And less intermediate steps could make for a faster switchover.
Activity
mnencia commentedon Feb 7, 2024
Given that the content of the token is only taken when the state is shut down, we could name it
shutdownToken.gbartolini commentedon Feb 7, 2024
Ok with
shutdownTokenorshutdownCheckpointToken.mnencia commentedon Feb 7, 2024
I like the latter. 👍 for
shutdownCheckpointToken[-][Feature]: Add `checkpointToken` in the status after fencing/hibernating[/-][+][Feature]: Add `shutdownCheckpointToken` in the status after fencing/hibernating[/+]gbartolini commentedon Feb 26, 2024
We should also make sure that this is set as part of #3796
12 remaining items
feat: add `ShutdownCheckpointToken`
feat: add `ShutdownCheckpointToken`
gbartolini commentedon Jun 5, 2024
Given that all the features related to switchover to a replica cluster are landing at the same time on version 1.24.0, it is IMHO unnecessary to introduce a gradual introduction of the feature that involves both fencing and hibernation. We should just update the status when demotion is requested. Thoughts @leonardoce @armru @fcanovai @mnencia?
leonardoce commentedon Jun 5, 2024
Yes, I agree. This would lead to a more maintainable implementation.
It will be less confusing to use: there would be just one way to do a DC switchover. And one E2E scenario will be enough to exercise the workflow.
fcanovai commentedon Jun 6, 2024
+1. If we have a single, fast and easy procedure to demote a cluster and promote the replica one it will be easier from everyone. And less intermediate steps could make for a faster switchover.
feat: add `ShutdownCheckpointToken`
feat: add `ShutdownCheckpointToken`
gbartolini commentedon Jun 19, 2024
This ticket has been converted to managing the
demotionTokenand to be triggered only when a primary cluster becomes a replica one.feat: add `ShutdownCheckpointToken`
feat: introduce controlled switchover of a replica cluster (cloudnati…