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

Added check for wal_retrieve_retry_interval parameter ALTER SYSTEM privilege presence #808

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

RealGreenDragon
Copy link

@RealGreenDragon RealGreenDragon commented May 7, 2023

The Repmgr standby_disconnect_on_failover option requires to edit permanently (ALTER SYSTEM privilege) wal_retrieve_retry_interval system parameter, privilege reserved to superusers only until PostgreSQL 14.

From PostgreSQL 15 it is changed, as reported on v15 changelog:

Allow GRANT to grant permissions to change individual server variables via SET and ALTER SYSTEM (Mark Dilger)

The new function has_parameter_privilege() reports on this privilege.

This PR add the check of wal_retrieve_retry_interval parameter change privilege via ALTER SYSTEM if repmgr database user is not a superuser.

@RealGreenDragon RealGreenDragon changed the title Added check for ALTER SYSTEM privilege presence Added check for wal_retrieve_retry_interval parameter change privilege presence Jun 9, 2023
@RealGreenDragon
Copy link
Author

Fixed PR title and description as the privilege name is parameter, instead ALTER SYSTEM is the particular parameter privilege to change the value permanently and not only in current session (SET privilege).

@RealGreenDragon RealGreenDragon changed the title Added check for wal_retrieve_retry_interval parameter change privilege presence Added check for wal_retrieve_retry_interval parameter ALTER SYSTEM privilege presence Jun 9, 2023
@RealGreenDragon
Copy link
Author

Any news on this PR?

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.

None yet

1 participant