Skip to content

fix: handle unrecognized configuration parameter in GetSynchronousReplicationMetadata - #10549

Open
augustoribeiro wants to merge 1 commit into
cloudnative-pg:mainfrom
augustoribeiro:ari/prefered_failoverquorum
Open

augustoribeiro wants to merge 1 commit into
cloudnative-pg:mainfrom
augustoribeiro:ari/prefered_failoverquorum

Conversation

@augustoribeiro

@augustoribeiro augustoribeiro commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

DISCLAIMER: used claude-code for creating this PR. Please reject if it is not ok or suggest changes if suitable.

Fixes #10547

Added logic to return nil when the synchronous_standby_names_metadata GUC is unrecognized, indicated by SQLSTATE 42704. This improves error handling in the WaitForConfigReload function.

Not sure if this has other side effects, I tried to run the integration tests locally but some fail in master too.

@augustoribeiro
augustoribeiro requested a review from a team April 24, 2026 07:55
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Apr 24, 2026
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.28 labels Apr 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@dosubot dosubot Bot added the bug 🐛 Something isn't working label Apr 24, 2026
…licationMetadata

Added logic to return nil when the synchronous_standby_names_metadata GUC is unrecognized, indicated by SQLSTATE 42704. This improves error handling in the WaitForConfigReload function.

Signed-off-by: augusto.ribeiro <[email protected]>
@korchak-aleksandr

Copy link
Copy Markdown

Friendly ping: this is still needed on current main. GetSynchronousReplicationMetadata() still
returns the error when cnpg.synchronous_standby_names_metadata isn't defined yet, so with
preferred + failoverQuorum + streaming startup probes a new replica never becomes ready (#10547).
Returning nil here looks safe: the FailoverQuorum stays empty, so failover is denied until the
metadata is published.

#12023 reads the same metadata, so it would be good to land both. We'll include this combination
in our 2-instance tests of #12023.

@gbartolini, if it makes sense, #10547 could be reopened too: the stale bot closed it while this fix
was waiting for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases bug 🐛 Something isn't working release-1.28 release-1.30 size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Instance is never ready due to dataDurability preferred + failoverQuorum interaction

4 participants