From 0112843f1b89a5931ef40d4296e03a2446617f87 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Fri, 25 Oct 2019 11:50:06 +0900 Subject: [PATCH] doc: note permission requirements for "repmgr standby (promote|switchover) Per issues noted in GitHub #595. --- doc/repmgr-standby-promote.xml | 21 +++++++++++++++++++++ doc/repmgr-standby-switchover.xml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/doc/repmgr-standby-promote.xml b/doc/repmgr-standby-promote.xml index 50c19511..72be9595 100644 --- a/doc/repmgr-standby-promote.xml +++ b/doc/repmgr-standby-promote.xml @@ -86,6 +86,7 @@ + Example @@ -101,6 +102,26 @@ + + User permission requirements + pg_promote() (PostgreSQL 12) + + From PostgreSQL 12, &repmgr; uses the pg_promote() function to promote a standby + to primary. + + + By default, execution of pg_promote() is restricted to superusers. + If the repmgr use is not a superuser, execution permission for this + function must be granted with e.g.: + + GRANT EXECUTE ON FUNCTION pg_catalog.pg_promote TO repmgr + + + A future &repmgr; release will relax this restriction by falling back to + pg_ctl promote, as used for pre-PostgreSQL 12 versions. + + + Options diff --git a/doc/repmgr-standby-switchover.xml b/doc/repmgr-standby-switchover.xml index 8cf4aba5..ef56e25e 100644 --- a/doc/repmgr-standby-switchover.xml +++ b/doc/repmgr-standby-switchover.xml @@ -63,6 +63,37 @@ + User permission requirements + CHECKPOINT + + &repmgr; executes CHECKPOINT on the demotion candidate as part of the shutdown + process. + + + Note that CHECKPOINT requires database superuser permissions to execute. + If the repmgr user is not a superuser, the checkpoint operation will + fail, though this is not a fatal error &repmgr; will continue the switchover process. + + pg_promote() (PostgreSQL 12) + + From PostgreSQL 12, &repmgr; uses the pg_promote() function to promote a standby + to primary. + + + By default, execution of pg_promote() is restricted to superusers. + If the repmgr use is not a superuser, execution permission for this + function must be granted with e.g.: + + GRANT EXECUTE ON FUNCTION pg_catalog.pg_promote TO repmgr + + + A future &repmgr; release will relax this restriction by falling back to + pg_ctl promote, as used for pre-PostgreSQL 12 versions. + + + + + Options