Skip to content

Provide fix for failing pg_rewind with non-superuser#909

Open
martinmarques wants to merge 1 commit intomasterfrom
dev/repmgr-829
Open

Provide fix for failing pg_rewind with non-superuser#909
martinmarques wants to merge 1 commit intomasterfrom
dev/repmgr-829

Conversation

@martinmarques
Copy link
Copy Markdown
Collaborator

Issue #829 was opened indicating, with a reproducible, that repmgr was not able to run node rejoin with minimal privileged user. The main obstacle is that pg_rewind is not able to execute the rewind operation if the user has REPLICATION privileges, but the user repmgr uses requires REPLICATION. This is a typical catch22.

The solution provided here adds a --superuser, similar to what other commands have, to node rejoin

Fixes #829

Issue #829 was opened indicating, with a reproducible, that repmgr
was not able to run `node rejoin` with minimal privileged user. The
main obstacle is that pg_rewind is not able to execute the rewind
operation if the user has REPLICATION privileges, but the user
repmgr uses requires REPLICATION. This is a typical catch22.

The solution provided here adds a --superuser, similar to what
other commands have, to `node rejoin`

AI-assisted development notes:

    The approach was designed and directed by Martín Marqués, who
    also reviewed and refined the output. Code was written by Claude
    (AI), with some additions from Martín in the documentation.

Fixes #829

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
@martinmarques martinmarques requested a review from a team as a code owner March 31, 2026 14:08
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.

old primary node rejoin after failover uncompatitable with pg_rewind

1 participant