fix: do not require restart for replica cluster promotion#10666
Draft
leonardoce wants to merge 3 commits into
Draft
fix: do not require restart for replica cluster promotion#10666leonardoce wants to merge 3 commits into
leonardoce wants to merge 3 commits into
Conversation
Contributor
Author
|
/test |
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
Contributor
|
@leonardoce, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/25672508809 |
dc7900a to
389207d
Compare
Contributor
Author
|
/test |
Contributor
|
@leonardoce, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/25731672471 |
28a5013 to
9c8453e
Compare
When promoting a replica cluster to a primary cluster, PostgreSQL previously needed a restart because archive_mode changed from "always" to "on", which is a fixed parameter. This change always sets archive_mode to "always" and moves the decision of whether to actually ship WAL into the archiver: - Primary clusters: the archiver archives from the current primary, skips silently on HA replicas (standby.signal is present), and keeps WAL in the ready queue on a former primary being demoted (standby.signal absent, CurrentPrimary no longer matches). - Replica clusters: behaviour is unchanged — only the designated primary (CurrentPrimary or TargetPrimary) archives WAL. Promoting a replica cluster to a primary cluster does not requires a restart. Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
9c8453e to
45569ac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When promoting a replica cluster to a primary cluster, PostgreSQL previously needed a restart because archive_mode changed from "always" to "on", which is a fixed parameter.
This change always sets archive_mode to "always" and moves the decision of whether to actually ship WAL into the archiver:
Promoting a replica cluster to a primary cluster does not requires a restart.