mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
128 lines
3.7 KiB
XML
128 lines
3.7 KiB
XML
<refentry id="repmgr-service-pause">
|
|
<indexterm>
|
|
<primary>repmgr service pause</primary>
|
|
</indexterm>
|
|
|
|
<indexterm>
|
|
<primary>repmgrd</primary>
|
|
<secondary>pausing</secondary>
|
|
</indexterm>
|
|
|
|
<refmeta>
|
|
<refentrytitle>repmgr service pause</refentrytitle>
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
<refname>repmgr service pause</refname>
|
|
<refpurpose>Instruct all &repmgrd; instances in the replication cluster to pause failover operations</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<para>
|
|
This command can be run on any active node in the replication cluster to instruct all
|
|
running &repmgrd; instances to "pause" themselves, i.e. take no
|
|
action (such as promoting themselves or following a new primary) if a failover event is detected.
|
|
</para>
|
|
<para>
|
|
This functionality is useful for performing maintenance operations, such as switchovers
|
|
or upgrades, which might otherwise trigger a failover if &repmgrd;
|
|
is running normally.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
It's important to wait a few seconds after restarting PostgreSQL on any node before running
|
|
<command>repmgr service pause</command>, as the &repmgrd; instance
|
|
on the restarted node will take a second or two before it has updated its status.
|
|
</para>
|
|
</note>
|
|
<para>
|
|
<xref linkend="repmgr-service-unpause"/> will instruct all previously paused &repmgrd;
|
|
instances to resume normal failover operation.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Prerequisites</title>
|
|
<para>
|
|
PostgreSQL must be accessible on all nodes (using the <varname>conninfo</varname> string shown by
|
|
<link linkend="repmgr-cluster-show"><command>repmgr cluster show</command></link>)
|
|
from the node where <command>repmgr service pause</command> is executed.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Execution</title>
|
|
<para>
|
|
<command>repmgr service pause</command> can be executed on any active node in the
|
|
replication cluster. A valid <filename>repmgr.conf</filename> file is required.
|
|
It will have no effect on previously paused nodes.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Example</title>
|
|
<para>
|
|
<programlisting>
|
|
$ repmgr -f /etc/repmgr.conf service pause
|
|
NOTICE: node 1 (node1) paused
|
|
NOTICE: node 2 (node2) paused
|
|
NOTICE: node 3 (node3) paused</programlisting>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Options</title>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><option>--dry-run</option></term>
|
|
<listitem>
|
|
<para>
|
|
Check if nodes are reachable but don't pause &repmgrd;.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Exit codes</title>
|
|
<para>
|
|
One of the following exit codes will be emitted by <command>repmgr service unpause</command>:
|
|
</para>
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
<term><option>SUCCESS (0)</option></term>
|
|
<listitem>
|
|
<para>
|
|
&repmgrd; could be paused on all nodes.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>ERR_REPMGRD_PAUSE (26)</option></term>
|
|
<listitem>
|
|
<para>
|
|
&repmgrd; could not be paused on one or mode nodes.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>See also</title>
|
|
<para>
|
|
<xref linkend="repmgr-service-unpause"/>,
|
|
<xref linkend="repmgr-service-status"/>,
|
|
<xref linkend="repmgrd-pausing"/>,
|
|
<xref linkend="repmgr-daemon-start"/>,
|
|
<xref linkend="repmgr-daemon-stop"/>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|