feat: introduce experimental support for failover quorum#7572
Merged
gbartolini merged 22 commits intocloudnative-pg:mainfrom Jul 29, 2025
Merged
feat: introduce experimental support for failover quorum#7572gbartolini merged 22 commits intocloudnative-pg:mainfrom
gbartolini merged 22 commits intocloudnative-pg:mainfrom
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
00a7307 to
5d34856
Compare
armru
approved these changes
May 26, 2025
b251677 to
4f6fbe8
Compare
Member
|
/test limit=local |
Contributor
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/15257221326 |
13e1914 to
08b4771
Compare
80a5126 to
63ef015
Compare
3055371 to
918eaca
Compare
mnencia
approved these changes
Jul 23, 2025
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Fix an issue where enabling the syncquorum on a cluster with synchronous replication prevented failovers until a configuration change. Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
The .spec.cluster.name doesn't exist anymore and the syncquorum name is tied to the cluster name. We remove the column. Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
We should display how long ago the resource was generated. Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Document how to enable the feature and how it works, with a few scenarios to make it easier to understand. Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
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>
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
gbartolini
approved these changes
Jul 29, 2025
fcanovai
approved these changes
Jul 29, 2025
4 tasks
2 tasks
Contributor
|
@ardentperf, I apologise for not mentioning your contributions in the commit itself. I will make sure we add you in #8170. |
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.
This commit adds opt-in, experimental support for "failover quorum", also known as "quorum-based failover", in CloudNativePG.
Failover quorum is a mechanism designed to improve data durability and safety during failover events by ensuring that the promoted replica contains all synchronously committed data.
With synchronous replication, a transaction is acknowledged only after all required synchronous standbys have received the WAL data. However, this alone doesn't guarantee that the operator can always promote the most advanced replica during a failure.
The failover quorum mechanism addresses this risk by requiring the operator to verify that a quorum of replicas agrees on the promotion. This ensures that the selected replica has all required committed data. If this quorum is not met, failover will not proceed, reducing the risk of data loss.
To enable the feature, set the annotation:
cnpg.io/failoverQuorum="true"in theClusterresource.Once stabilised, a dedicated configuration field will replace this annotation.
For further information, refer to the included documentation and the related issue.
Closes #7481