Skip to content
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

Add GUC controlling whether to pause recovery if some critical GUCs at replica have smaller value than on primary #501

Open
wants to merge 2 commits into
base: REL_16_STABLE_neon
Choose a base branch
from

Conversation

knizhnik
Copy link

Comment on lines +1809 to +1818
{
{"recovery_pause_on_misconfig", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
gettext_noop("Pause recovery if values of critical GUCs at replica are smaller than on primary."),
NULL
},
&recoveryPauseOnMisconfig,
false,
NULL, NULL, NULL
},

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead expose this GUC in the neon extension under neon.recovery_pause_on_misconfig? Exposing a new, non-standard GUC outside the neon namespace seems wrong to me.

Comment on lines +4801 to +4815
if (!recoveryPauseOnMisconfig)
return;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, what's our solution here? We don't pause and just continue? We shut down?

@knizhnik knizhnik force-pushed the pause_recovery_at_misconfig_v16 branch from 0bb232c to b47180d Compare September 23, 2024 15:51
Comment on lines -4860 to 4866
ereport(FATAL,
ereport(recoveryPauseOnMisconfig ? FATAL : WARNING,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("recovery aborted because of insufficient parameter settings"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is misleading. You print a WARNING that says "recovery aborted", but it is not aborted.

The GUC name is misleading too: if it's 'on', you abort rather than pause here.

@knizhnik knizhnik force-pushed the pause_recovery_at_misconfig_v16 branch from b47180d to e6e8408 Compare November 13, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants