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>
* Added check for pg_checkpoint role presence
This commit provides the needed infrastructure in `repmgr` so if the `repmgr` database
user is a member of the `pg_checkpoint` role, and inherits its privileges, there is no
need for such a user to be a superuser.
Co-authored-by: Martín Marqués <martin.marques@enterprisedb.com>
Information about using repmgr with a non-superuser was spread
throughout individual documentation systems; this commit creates
an overview of requirements and potential issues.