forked from percona/orchestrator
-
Notifications
You must be signed in to change notification settings - Fork 0
feat(postgresql): graceful primary switchover #99
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a8d8e00
docs: add design spec for PostgreSQL graceful primary switchover
renecannao 31ffa1b
docs: add implementation plan for PostgreSQL graceful primary switchover
renecannao 44c12e9
feat(postgresql): add PostgreSQLSetReadOnly for graceful switchover
renecannao 51ce741
feat(postgresql): add PostgreSQLGetCurrentWALLSN for graceful switchover
renecannao d6c4a9f
feat(postgresql): add PostgreSQLWaitForStandbyLSN for graceful switch…
renecannao 1dfea47
feat(postgresql): add PostgreSQLRepositionAsStandby for graceful swit…
renecannao 19b510b
feat(postgresql): add PostgreSQLGracefulPrimarySwitchover orchestration
renecannao ae749c7
feat(postgresql): dispatch graceful-master-takeover to PostgreSQL swi…
renecannao 2ea800e
test(postgresql): add functional test for graceful primary switchover
renecannao a7c0456
docs: update PostgreSQL docs to reflect graceful switchover support
renecannao dcafd12
fix(postgresql): address code review findings for graceful switchover
renecannao a594961
test(postgresql): expand graceful switchover coverage and enforce in CI
renecannao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
PostgreSQL privileges required for ALTER SYSTEM pg_reload_conf pg_terminate_backend pg_signal_backend💡 Result:
PostgreSQL privileges required: - ALTER SYSTEM: Superuser or users granted the ALTER SYSTEM privilege on the specific configuration parameter (via GRANT ALTER SYSTEM ON PARAMETER ...). {value: Superuser or ALTER SYSTEM privilege on parameter, citations: [1,2,4], confidence: high} - pg_reload_conf: Superuser or EXECUTE privilege granted on the pg_catalog.pg_reload_conf function (via GRANT EXECUTE ON FUNCTION pg_catalog.pg_reload_conf TO role;). These signaling functions are restricted to superusers by default but access may be granted using GRANT. {value: Superuser or EXECUTE on pg_reload_conf, citations: [6,8,11], confidence: high} - pg_terminate_backend(pid): Superuser, or the calling role is a member of the target backend's role, or has privileges of the pg_signal_backend role. Only superusers can terminate superuser backends. {value: Superuser, member of target role, or pg_signal_backend role, citations: [6,7,11], confidence: high} - pg_signal_backend(pid): This appears to refer to the pg_signal_backend predefined role (not a function). Membership in pg_signal_backend role allows signaling (cancel/terminate) other backends (via pg_cancel_backend/pg_terminate_backend). Superusers bypass this. {value: pg_signal_backend role membership, citations: [6,7,13], confidence: high}
Citations:
🏁 Script executed:
Repository: ProxySQL/orchestrator
Length of output: 2911
🏁 Script executed:
Repository: ProxySQL/orchestrator
Length of output: 688
🏁 Script executed:
Repository: ProxySQL/orchestrator
Length of output: 149
🏁 Script executed:
Repository: ProxySQL/orchestrator
Length of output: 5706
🏁 Script executed:
Repository: ProxySQL/orchestrator
Length of output: 47
🏁 Script executed:
Repository: ProxySQL/orchestrator
Length of output: 1039
Add privilege requirements to PostgreSQL graceful takeover documentation.
The graceful takeover implementation requires additional PostgreSQL privileges beyond
pg_monitor. The operations (ALTER SYSTEM,pg_reload_conf(),pg_terminate_backend()) require superuser access or equivalent role-based privileges. Update the documentation to specify these requirements so operators can configure the orchestrator user with the necessary permissions before attempting graceful takeover.🤖 Prompt for AI Agents