mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
doc: clarify pg_promote() usage
This commit is contained in:
@@ -104,15 +104,15 @@
|
|||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>User permission requirements</title>
|
<title>User permission requirements</title>
|
||||||
<para><emphasis>pg_promote() (PostgreSQL 12)</emphasis></para>
|
<para><emphasis>pg_promote() (PostgreSQL 12 and later)</emphasis></para>
|
||||||
<para>
|
<para>
|
||||||
From PostgreSQL 12, &repmgr; will attempt to use the <function>pg_promote()</function> function
|
From PostgreSQL 12, &repmgr; will attempt to use the built-in <function>pg_promote()</function>
|
||||||
to promote a standby to primary.
|
function to promote a standby to primary.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
By default, execution of <function>pg_promote()</function> is restricted to superusers.
|
By default, execution of <function>pg_promote()</function> is restricted to superusers.
|
||||||
If the <literal>repmgr</literal> user does not have permission to execute
|
If the <literal>repmgr</literal> user does not have permission to execute
|
||||||
<function>pg_promote()</function>, &repmgr; will fall back to using <command>pg_ctl promote</command>.
|
<function>pg_promote()</function>, &repmgr; will fall back to using "<command>pg_ctl promote</command>".
|
||||||
</para>
|
</para>
|
||||||
<tip>
|
<tip>
|
||||||
<para>
|
<para>
|
||||||
@@ -122,6 +122,10 @@
|
|||||||
GRANT EXECUTE ON FUNCTION pg_catalog.pg_promote TO repmgr</programlisting>
|
GRANT EXECUTE ON FUNCTION pg_catalog.pg_promote TO repmgr</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</tip>
|
</tip>
|
||||||
|
<para>
|
||||||
|
For more details on <function>pg_promote()</function>, see the
|
||||||
|
<ulink url="https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL-TABLE">PostgreSQL documentation</ulink>.
|
||||||
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
|
|||||||
@@ -74,21 +74,17 @@
|
|||||||
If the <literal>repmgr</literal> user is not a superuser, the checkpoint operation will
|
If the <literal>repmgr</literal> user is not a superuser, the checkpoint operation will
|
||||||
fail, though this is not a fatal error &repmgr; will continue the switchover process.
|
fail, though this is not a fatal error &repmgr; will continue the switchover process.
|
||||||
</para>
|
</para>
|
||||||
<para><emphasis>pg_promote() (PostgreSQL 12)</emphasis></para>
|
<para><emphasis>pg_promote() (PostgreSQL 12 and later)</emphasis></para>
|
||||||
<para>
|
<para>
|
||||||
From PostgreSQL 12, &repmgr; uses the <command>pg_promote()</command> function to promote a standby
|
From PostgreSQL 12, &repmgr; defaults to using the built-in <command>pg_promote()</command> function to
|
||||||
to primary.
|
promote a standby to primary.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
By default, execution of <command>pg_promote()</command> is restricted to superusers.
|
Note that execution of <function>pg_promote()</function> is restricted to superusers or to
|
||||||
If the <literal>repmgr</literal> use is not a superuser, execution permission for this
|
any user who has been granted execution permission for this function. If the &repmgr; user
|
||||||
function must be granted with e.g.:
|
is not permitted to execute <function>pg_promote()</function>, &repmgr; will fall back to using
|
||||||
<programlisting>
|
"<command>pg_ctl promote</command>". For more details see
|
||||||
GRANT EXECUTE ON FUNCTION pg_catalog.pg_promote TO repmgr</programlisting>
|
<link linkend="repmgr-standby-promote">repmgr standby promote</link>.
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
A future &repmgr; release will relax this restriction by falling back to
|
|
||||||
<command>pg_ctl promote</command>, as used for pre-PostgreSQL 12 versions.
|
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user