mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-24 07:36:30 +00:00
Rename some "repmgr daemon ..." commands to "repmgr service ..."
"repmgr daemon" can be interpreted to mean the commands affect the local daemon process only. Rename the commands which affect the entire cluster to "repmgr service ...". The "repmgr daemon ..." form of the affected commands is retained for backwards compatibility.
This commit is contained in:
@@ -23,6 +23,45 @@
|
||||
|
||||
<sect2>
|
||||
<title>Compatibility changes</title>
|
||||
<para>
|
||||
Some <command>repmgr daemon ...</command> commands have been renamed to
|
||||
<command>repmgr service ...</command> as they have a cluster-wide effect
|
||||
and to avoid giving the impression they affect only the local &repmgr; daemon.
|
||||
</para>
|
||||
<para>
|
||||
Following commands are affected:
|
||||
|
||||
<itemizedlist spacing="compact" mark="bullet">
|
||||
|
||||
<listitem>
|
||||
<simpara>
|
||||
<command>repmgr daemon pause</command>
|
||||
(now <link linkend="repmgr-service-pause"><command>repmgr service pause</command></link>)
|
||||
</simpara>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>
|
||||
<command>repmgr daemon unpause</command>
|
||||
(now <link linkend="repmgr-service-unpause"><command>repmgr service unpause</command></link>)
|
||||
</simpara>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>
|
||||
<command>repmgr daemon status</command>
|
||||
(now <link linkend="repmgr-service-status"><command>repmgr service status</command></link>)
|
||||
</simpara>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
The <command>repmgr daemon ...</command> form will still be accepted
|
||||
for backwards compatibility.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
The following command line options, which have been deprecated since &repmgr; 3.3
|
||||
(and which no longer had any effect other than to generate a warning about their use)
|
||||
@@ -209,7 +248,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
<link linkend="repmgr-daemon-status"><command>repmgr daemon status</command></link>:
|
||||
<link linkend="repmgr-service-status"><command>repmgr daemon status</command></link>:
|
||||
make output similar to that of
|
||||
<link linkend="repmgr-cluster-show"><command>repmgr cluster show</command></link>
|
||||
for consistency and to make it easier to identify nodes not in the expected
|
||||
@@ -227,7 +266,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
<listitem>
|
||||
<para>
|
||||
<link linkend="repmgr-cluster-show"><command>repmgr cluster show</command></link>
|
||||
and <link linkend="repmgr-daemon-status"><command>repmgr daemon status</command></link>:
|
||||
and <link linkend="repmgr-service-status"><command>repmgr daemon status</command></link>:
|
||||
show the upstream node name as reported by each individual node - this helps visualise
|
||||
situations where the cluster is in an unexpected state, and provide a better idea of the
|
||||
actual cluster state.
|
||||
@@ -245,7 +284,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
<listitem>
|
||||
<para>
|
||||
<link linkend="repmgr-cluster-show"><command>repmgr cluster show</command></link>
|
||||
and <link linkend="repmgr-daemon-status"><command>repmgr daemon status</command></link>:
|
||||
and <link linkend="repmgr-service-status"><command>repmgr daemon status</command></link>:
|
||||
check if a node is attached to its advertised upstream node, and issue a
|
||||
warning if the node is not attached.
|
||||
</para>
|
||||
@@ -462,7 +501,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
<link linkend="repmgr-daemon-status"><command>repmgr daemon status</command></link>
|
||||
<link linkend="repmgr-service-status"><command>repmgr daemon status</command></link>
|
||||
additionally displays the node priority and the interval (in seconds) since the
|
||||
&repmgrd; instance last verified its upstream node was available.
|
||||
</para>
|
||||
|
||||
@@ -54,11 +54,11 @@
|
||||
<!ENTITY repmgr-cluster-crosscheck SYSTEM "repmgr-cluster-crosscheck.xml">
|
||||
<!ENTITY repmgr-cluster-event SYSTEM "repmgr-cluster-event.xml">
|
||||
<!ENTITY repmgr-cluster-cleanup SYSTEM "repmgr-cluster-cleanup.xml">
|
||||
<!ENTITY repmgr-daemon-status SYSTEM "repmgr-daemon-status.xml">
|
||||
<!ENTITY repmgr-service-status SYSTEM "repmgr-service-status.xml">
|
||||
<!ENTITY repmgr-service-pause SYSTEM "repmgr-service-pause.xml">
|
||||
<!ENTITY repmgr-service-unpause SYSTEM "repmgr-service-unpause.xml">
|
||||
<!ENTITY repmgr-daemon-start SYSTEM "repmgr-daemon-start.xml">
|
||||
<!ENTITY repmgr-daemon-stop SYSTEM "repmgr-daemon-stop.xml">
|
||||
<!ENTITY repmgr-daemon-pause SYSTEM "repmgr-daemon-pause.xml">
|
||||
<!ENTITY repmgr-daemon-unpause SYSTEM "repmgr-daemon-unpause.xml">
|
||||
|
||||
<!ENTITY appendix-release-notes SYSTEM "appendix-release-notes.xml">
|
||||
<!ENTITY appendix-faq SYSTEM "appendix-faq.xml">
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-node-status"/>, <xref linkend="repmgr-node-check"/>, <xref linkend="repmgr-daemon-status"/>
|
||||
<xref linkend="repmgr-node-status"/>, <xref linkend="repmgr-node-check"/>, <xref linkend="repmgr-service-status"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
|
||||
<refnamediv>
|
||||
<refname>repmgr daemon start</refname>
|
||||
<refpurpose>Start the &repmgrd; daemon</refpurpose>
|
||||
<refpurpose>Start the &repmgrd; service</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
This command starts the &repmgrd; daemon on the
|
||||
This command starts the &repmgrd; service on the
|
||||
local node.
|
||||
</para>
|
||||
<para>
|
||||
@@ -197,7 +197,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-stop"/>, <xref linkend="repmgr-daemon-status"/>, <xref linkend="repmgrd-daemon"/>
|
||||
<xref linkend="repmgr-daemon-stop"/>, <xref linkend="repmgrd-daemon"/>, <xref linkend="repmgr-service-status"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-start"/>, <xref linkend="repmgr-daemon-status"/>, <xref linkend="repmgrd-daemon"/>
|
||||
<xref linkend="repmgr-daemon-start"/>, <xref linkend="repmgrd-daemon"/>, <xref linkend="repmgr-service-status"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<refentry id="repmgr-daemon-pause">
|
||||
<refentry id="repmgr-service-pause">
|
||||
<indexterm>
|
||||
<primary>repmgr daemon pause</primary>
|
||||
<primary>repmgr service pause</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
@@ -9,11 +9,11 @@
|
||||
</indexterm>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>repmgr daemon pause</refentrytitle>
|
||||
<refentrytitle>repmgr service pause</refentrytitle>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>repmgr daemon pause</refname>
|
||||
<refname>repmgr service pause</refname>
|
||||
<refpurpose>Instruct all &repmgrd; instances in the replication cluster to pause failover operations</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
<note>
|
||||
<para>
|
||||
It's important to wait a few seconds after restarting PostgreSQL on any node before running
|
||||
<command>repmgr daemon pause</command>, as the &repmgrd; instance
|
||||
<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-daemon-unpause"/> will instruct all previously paused &repmgrd;
|
||||
<xref linkend="repmgr-service-unpause"/> will instruct all previously paused &repmgrd;
|
||||
instances to resume normal failover operation.
|
||||
</para>
|
||||
</refsect1>
|
||||
@@ -45,7 +45,7 @@
|
||||
<refsect1>
|
||||
<title>Execution</title>
|
||||
<para>
|
||||
<command>repmgr daemon pause</command> can be executed on any active node in the
|
||||
<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>
|
||||
@@ -55,7 +55,7 @@
|
||||
<title>Example</title>
|
||||
<para>
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf daemon pause
|
||||
$ repmgr -f /etc/repmgr.conf service pause
|
||||
NOTICE: node 1 (node1) paused
|
||||
NOTICE: node 2 (node2) paused
|
||||
NOTICE: node 3 (node3) paused</programlisting>
|
||||
@@ -79,7 +79,7 @@ NOTICE: node 3 (node3) paused</programlisting>
|
||||
<refsect1>
|
||||
<title>Exit codes</title>
|
||||
<para>
|
||||
One of the following exit codes will be emitted by <command>repmgr daemon unpause</command>:
|
||||
One of the following exit codes will be emitted by <command>repmgr service unpause</command>:
|
||||
</para>
|
||||
<variablelist>
|
||||
|
||||
@@ -107,7 +107,7 @@ NOTICE: node 3 (node3) paused</programlisting>
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-unpause"/>, <xref linkend="repmgr-daemon-status"/>
|
||||
<xref linkend="repmgr-service-unpause"/>, <xref linkend="repmgr-service-status"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
@@ -1,19 +1,19 @@
|
||||
<refentry id="repmgr-daemon-status">
|
||||
<refentry id="repmgr-service-status">
|
||||
<indexterm>
|
||||
<primary>repmgr daemon status</primary>
|
||||
<primary>repmgr service status</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>displaying daemon status</secondary>
|
||||
<secondary>displaying service status</secondary>
|
||||
</indexterm>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>repmgr daemon status</refentrytitle>
|
||||
<refentrytitle>repmgr service status</refentrytitle>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>repmgr daemon status</refname>
|
||||
<refname>repmgr service status</refname>
|
||||
<refpurpose>display information about the status of &repmgrd; on each node in the cluster</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<para>
|
||||
This command provides an overview over all active nodes in the cluster and the state
|
||||
of each node's &repmgrd; instance. It can be used to check
|
||||
the result of <xref linkend="repmgr-daemon-pause"/> and <xref linkend="repmgr-daemon-unpause"/>
|
||||
the result of <xref linkend="repmgr-service-pause"/> and <xref linkend="repmgr-service-unpause"/>
|
||||
operations.
|
||||
</para>
|
||||
</refsect1>
|
||||
@@ -30,7 +30,7 @@
|
||||
<refsect1>
|
||||
<title>Execution</title>
|
||||
<para>
|
||||
<command>repmgr daemon status</command> can be executed on any active node in the
|
||||
<command>repmgr service status</command> can be executed on any active node in the
|
||||
replication cluster. A valid <filename>repmgr.conf</filename> file is required.
|
||||
</para>
|
||||
<para>
|
||||
@@ -51,7 +51,7 @@
|
||||
<title>Examples</title>
|
||||
<para>
|
||||
&repmgrd; running normally on all nodes:
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf daemon status
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf service status
|
||||
ID | Name | Role | Status | Upstream | repmgrd | PID | Paused? | Upstream last seen
|
||||
----+-------+---------+-----------+----------+---------+-------+---------+--------------------
|
||||
1 | node1 | primary | * running | | running | 96563 | no | n/a
|
||||
@@ -60,8 +60,8 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
&repmgrd; paused on all nodes (using <xref linkend="repmgr-daemon-pause"/>):
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf daemon status
|
||||
&repmgrd; paused on all nodes (using <xref linkend="repmgr-service-pause"/>):
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf service status
|
||||
ID | Name | Role | Status | Upstream | repmgrd | PID | Paused? | Upstream last seen
|
||||
----+-------+---------+-----------+----------+---------+-------+---------+--------------------
|
||||
1 | node1 | primary | * running | | running | 96563 | yes | n/a
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
<para>
|
||||
&repmgrd; not running on one node:
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf daemon status
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf service status
|
||||
ID | Name | Role | Status | Upstream | repmgrd | PID | Paused? | Upstream last seen
|
||||
----+-------+---------+-----------+----------+-------------+-------+---------+--------------------
|
||||
1 | node1 | primary | * running | | running | 96563 | yes | n/a
|
||||
@@ -89,11 +89,11 @@
|
||||
<term><option>--csv</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<command>repmgr daemon status</command> accepts an optional parameter <literal>--csv</literal>, which
|
||||
<command>repmgr service status</command> accepts an optional parameter <literal>--csv</literal>, which
|
||||
outputs the replication cluster's status in a simple CSV format, suitable for
|
||||
parsing by scripts, e.g.:
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf daemon status --csv
|
||||
$ repmgr -f /etc/repmgr.conf service status --csv
|
||||
1,node1,primary,1,1,5722,1,100,-1,default
|
||||
2,node2,standby,1,0,-1,1,100,1,default
|
||||
3,node3,standby,1,1,5779,1,100,1,default</programlisting>
|
||||
@@ -171,7 +171,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Display additional information (<literal>location</literal>, <literal>priority</literal>)
|
||||
about the &repmgr; configuration.
|
||||
about the &repmgr; configuration.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -180,7 +180,7 @@
|
||||
<term><option>--verbose</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Display the full text of any database connection error messages
|
||||
Display the full text of any database connection error messages.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -192,7 +192,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-pause"/>, <xref linkend="repmgr-daemon-unpause"/>, <xref linkend="repmgr-cluster-show"/>
|
||||
<xref linkend="repmgr-service-pause"/>, <xref linkend="repmgr-service-unpause"/>, <xref linkend="repmgr-cluster-show"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
@@ -1,6 +1,6 @@
|
||||
<refentry id="repmgr-daemon-unpause">
|
||||
<refentry id="repmgr-service-unpause">
|
||||
<indexterm>
|
||||
<primary>repmgr daemon unpause</primary>
|
||||
<primary>repmgr service unpause</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
@@ -8,13 +8,12 @@
|
||||
<secondary>unpausing</secondary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>repmgr daemon unpause</refentrytitle>
|
||||
<refentrytitle>repmgr service unpause</refentrytitle>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>repmgr daemon unpause</refname>
|
||||
<refname>repmgr service unpause</refname>
|
||||
<refpurpose>Instruct all &repmgrd; instances in the replication cluster to resume failover operations</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
@@ -23,14 +22,14 @@
|
||||
<para>
|
||||
This command can be run on any active node in the replication cluster to instruct all
|
||||
running &repmgrd; instances to "unpause"
|
||||
(following a previous execution of <xref linkend="repmgr-daemon-pause"/>)
|
||||
(following a previous execution of <xref linkend="repmgr-service-pause"/>)
|
||||
and resume normal failover/monitoring operation.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
It's important to wait a few seconds after restarting PostgreSQL on any node before running
|
||||
<command>repmgr daemon pause</command>, as the &repmgrd; instance
|
||||
<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>
|
||||
@@ -40,7 +39,7 @@
|
||||
<refsect1>
|
||||
<title>Execution</title>
|
||||
<para>
|
||||
<command>repmgr daemon unpause</command> can be executed on any active node in the
|
||||
<command>repmgr service unpause</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 nodes which are not already paused.
|
||||
</para>
|
||||
@@ -50,7 +49,7 @@
|
||||
<title>Example</title>
|
||||
<para>
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf daemon unpause
|
||||
$ repmgr -f /etc/repmgr.conf service unpause
|
||||
NOTICE: node 1 (node1) unpaused
|
||||
NOTICE: node 2 (node2) unpaused
|
||||
NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
@@ -74,7 +73,7 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
<refsect1>
|
||||
<title>Exit codes</title>
|
||||
<para>
|
||||
One of the following exit codes will be emitted by <command>repmgr daemon unpause</command>:
|
||||
One of the following exit codes will be emitted by <command>repmgr service unpause</command>:
|
||||
</para>
|
||||
<variablelist>
|
||||
|
||||
@@ -102,7 +101,7 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-pause"/>, <xref linkend="repmgr-daemon-status"/>
|
||||
<xref linkend="repmgr-service-pause"/>, <xref linkend="repmgr-service-status"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
@@ -23,7 +23,8 @@
|
||||
<important>
|
||||
<para>
|
||||
If &repmgrd; is active, you must execute
|
||||
<command><link linkend="repmgr-daemon-pause">repmgr daemon pause</link></command>
|
||||
<command><link linkend="repmgr-service-pause">repmgr service pause</link></command>
|
||||
(&repmgr; 4.2 - 4.4: <command><link linkend="repmgr-service-pause">repmgr service pause</link></command>)
|
||||
to temporarily disable &repmgrd; while making any changes
|
||||
to the replication cluster.
|
||||
</para>
|
||||
|
||||
@@ -116,11 +116,11 @@
|
||||
&repmgr-cluster-crosscheck;
|
||||
&repmgr-cluster-event;
|
||||
&repmgr-cluster-cleanup;
|
||||
&repmgr-daemon-status;
|
||||
&repmgr-service-status;
|
||||
&repmgr-service-pause;
|
||||
&repmgr-service-unpause;
|
||||
&repmgr-daemon-start;
|
||||
&repmgr-daemon-stop;
|
||||
&repmgr-daemon-pause;
|
||||
&repmgr-daemon-unpause;
|
||||
</part>
|
||||
|
||||
&appendix-release-notes;
|
||||
|
||||
@@ -199,9 +199,10 @@
|
||||
|
||||
<para>
|
||||
The time the primary was last seen by each node can be checked by executing
|
||||
<link linkend="repmgr-daemon-status"><command>repmgr daemon status</command></link>,
|
||||
<link linkend="repmgr-service-status"><command>repmgr service status</command></link>
|
||||
(&repmgr; 4.2 - 4.4: <link linkend="repmgr-service-status"><command>repmgr daemon status</command></link>)
|
||||
which includes this in its output, e.g.:
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf daemon status
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf service status
|
||||
ID | Name | Role | Status | Upstream | repmgrd | PID | Paused? | Upstream last seen
|
||||
----+-------+---------+-----------+----------+---------+-------+---------+--------------------
|
||||
1 | node1 | primary | * running | | running | 96563 | no | n/a
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
&repmgrd; is a daemon which runs on each PostgreSQL node,
|
||||
&repmgrd; is a daemon process which runs on each PostgreSQL node,
|
||||
monitoring the local node, and (unless it's the primary node) the upstream server
|
||||
(the primary server or with cascading replication, another standby) which it's
|
||||
connected to.
|
||||
@@ -519,7 +519,8 @@
|
||||
</indexterm>
|
||||
<para>
|
||||
If you are intending to use the <link linkend="repmgr-daemon-start"><command>repmgr daemon start</command></link>
|
||||
and <link linkend="repmgr-daemon-stop"><command>repmgr daemon stop</command></link> commands, the following
|
||||
and <link linkend="repmgr-daemon-stop"><command>repmgr daemon stop</command></link>
|
||||
commands, the following
|
||||
parameters <emphasis>must</emphasis> be set in <filename>repmgr.conf</filename>:
|
||||
<itemizedlist spacing="compact" mark="bullet">
|
||||
|
||||
@@ -860,7 +861,7 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
|
||||
<para>
|
||||
The commands <link linkend="repmgr-daemon-start"><command>repmgr daemon start</command></link> and
|
||||
<link linkend="repmgr-daemon-stop"><command>repmgr daemon stop</command></link> can be used
|
||||
as convenience wrappers to start and stop &repmgrd;.
|
||||
as convenience wrappers to start and stop &repmgrd; on the local node.
|
||||
</para>
|
||||
<important>
|
||||
<para>
|
||||
|
||||
@@ -88,17 +88,21 @@
|
||||
<sect2 id="repmgrd-pausing-execution">
|
||||
<title>Pausing/unpausing &repmgrd;</title>
|
||||
<para>
|
||||
To pause &repmgrd;, execute <link linkend="repmgr-daemon-pause"><command>repmgr daemon pause</command></link>, e.g.:
|
||||
To pause &repmgrd;, execute <link linkend="repmgr-service-pause"><command>repmgr service pause</command></link>
|
||||
(&repmgr; 4.2 - 4.4: <link linkend="repmgr-service-pause"><command>repmgr daemon pause</command></link>),
|
||||
e.g.:
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf daemon pause
|
||||
$ repmgr -f /etc/repmgr.conf service pause
|
||||
NOTICE: node 1 (node1) paused
|
||||
NOTICE: node 2 (node2) paused
|
||||
NOTICE: node 3 (node3) paused</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
The state of &repmgrd; on each node can be checked with
|
||||
<link linkend="repmgr-daemon-status"><command>repmgr daemon status</command></link>, e.g.:
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf daemon status
|
||||
<link linkend="repmgr-service-status"><command>repmgr service status</command></link>
|
||||
(&repmgr; 4.2 - 4.4: <link linkend="repmgr-service-status"><command>repmgr daemon status</command></link>),
|
||||
e.g.:
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf service status
|
||||
ID | Name | Role | Status | repmgrd | PID | Paused?
|
||||
----+-------+---------+---------+---------+------+---------
|
||||
1 | node1 | primary | running | running | 7851 | yes
|
||||
@@ -108,8 +112,8 @@ NOTICE: node 3 (node3) paused</programlisting>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
If executing a switchover with <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>,
|
||||
&repmgr; will automatically pause/unpause &repmgrd; as part of the switchover process.
|
||||
If executing a switchover with <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>,
|
||||
&repmgr; will automatically pause/unpause the &repmgrd; service as part of the switchover process.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@@ -117,29 +121,32 @@ NOTICE: node 3 (node3) paused</programlisting>
|
||||
If the primary (in this example, <literal>node1</literal>) is stopped, &repmgrd;
|
||||
running on one of the standbys (here: <literal>node2</literal>) will react like this:
|
||||
<programlisting>
|
||||
[2018-09-20 12:22:21] [WARNING] unable to connect to upstream node "node1" (ID: 1)
|
||||
[2018-09-20 12:22:21] [INFO] checking state of node 1, 1 of 5 attempts
|
||||
[2018-09-20 12:22:21] [INFO] sleeping 1 seconds until next reconnection attempt
|
||||
[2019-08-28 12:22:21] [WARNING] unable to connect to upstream node "node1" (node ID: 1)
|
||||
[2019-08-28 12:22:21] [INFO] checking state of node 1, 1 of 5 attempts
|
||||
[2019-08-28 12:22:21] [INFO] sleeping 1 seconds until next reconnection attempt
|
||||
...
|
||||
[2018-09-20 12:22:24] [INFO] sleeping 1 seconds until next reconnection attempt
|
||||
[2018-09-20 12:22:25] [INFO] checking state of node 1, 5 of 5 attempts
|
||||
[2018-09-20 12:22:25] [WARNING] unable to reconnect to node 1 after 5 attempts
|
||||
[2018-09-20 12:22:25] [NOTICE] node is paused
|
||||
[2018-09-20 12:22:33] [INFO] node "node2" (ID: 2) monitoring upstream node "node1" (ID: 1) in degraded state
|
||||
[2018-09-20 12:22:33] [DETAIL] repmgrd paused by administrator
|
||||
[2018-09-20 12:22:33] [HINT] execute "repmgr daemon unpause" to resume normal failover mode</programlisting>
|
||||
[2019-08-28 12:22:24] [INFO] sleeping 1 seconds until next reconnection attempt
|
||||
[2019-08-28 12:22:25] [INFO] checking state of node 1, 5 of 5 attempts
|
||||
[2019-08-28 12:22:25] [WARNING] unable to reconnect to node 1 after 5 attempts
|
||||
[2019-08-28 12:22:25] [NOTICE] node is paused
|
||||
[2019-08-28 12:22:33] [INFO] node "node2" (ID: 2) monitoring upstream node "node1" (node ID: 1) in degraded state
|
||||
[2019-08-28 12:22:33] [DETAIL] repmgrd paused by administrator
|
||||
[2019-08-28 12:22:33] [HINT] execute "repmgr service unpause" to resume normal failover mode</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
If the primary becomes available again (e.g. following a software upgrade), &repmgrd;
|
||||
will automatically reconnect, e.g.:
|
||||
<programlisting>
|
||||
[2018-09-20 13:12:41] [NOTICE] reconnected to upstream node 1 after 8 seconds, resuming monitoring</programlisting>
|
||||
[2019-08-28 12:25:41] [NOTICE] reconnected to upstream node 1 after 8 seconds, resuming monitoring</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To unpause &repmgrd;, execute <link linkend="repmgr-daemon-unpause"><command>repmgr daemon unpause</command></link>, e.g.:
|
||||
To unpause the &repmgrd; service, execute
|
||||
<link linkend="repmgr-service-unpause"><command>repmgr service unpause</command></link>
|
||||
((&repmgr; 4.2 - 4.4: <link linkend="repmgr-service-unpause"><command>repmgr daemon unpause</command></link>),
|
||||
e.g.:
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf daemon unpause
|
||||
$ repmgr -f /etc/repmgr.conf service unpause
|
||||
NOTICE: node 1 (node1) unpaused
|
||||
NOTICE: node 2 (node2) unpaused
|
||||
NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
@@ -150,11 +157,11 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
If the previous primary is no longer accessible when &repmgrd;
|
||||
is unpaused, no failover action will be taken. Instead, a new primary must be manually promoted using
|
||||
<link linkend="repmgr-standby-promote"><command>repmgr standby promote</command></link>,
|
||||
and any standbys attached to the new primary with
|
||||
<link linkend="repmgr-standby-follow"><command>repmgr standby follow</command></link>.
|
||||
and any standbys attached to the new primary with
|
||||
<link linkend="repmgr-standby-follow"><command>repmgr standby follow</command></link>.
|
||||
</para>
|
||||
<para>
|
||||
This is to prevent <link linkend="repmgr-daemon-unpause"><command>repmgr daemon unpause</command></link>
|
||||
This is to prevent execution of <link linkend="repmgr-service-unpause"><command>repmgr service unpause</command></link>
|
||||
resulting in the automatic promotion of a new primary, which may be a problem particularly
|
||||
in larger clusters, where &repmgrd; could select a different promotion
|
||||
candidate to the one intended by the administrator.
|
||||
@@ -168,17 +175,17 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
The pause state of each node will be stored over a PostgreSQL restart.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<link linkend="repmgr-daemon-pause"><command>repmgr daemon pause</command></link> and
|
||||
<link linkend="repmgr-daemon-unpause"><command>repmgr daemon unpause</command></link> can be
|
||||
executed even if &repmgrd; is not running; in this case,
|
||||
&repmgrd; will start up in whichever pause state has been set.
|
||||
</para>
|
||||
<para>
|
||||
<link linkend="repmgr-service-pause"><command>repmgr service pause</command></link> and
|
||||
<link linkend="repmgr-service-unpause"><command>repmgr service unpause</command></link> can be
|
||||
executed even if &repmgrd; is not running; in this case,
|
||||
&repmgrd; will start up in whichever pause state has been set.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
<link linkend="repmgr-daemon-pause"><command>repmgr daemon pause</command></link> and
|
||||
<link linkend="repmgr-daemon-unpause"><command>repmgr daemon unpause</command></link>
|
||||
<emphasis>do not</emphasis> stop/start &repmgrd;.
|
||||
<link linkend="repmgr-service-pause"><command>repmgr service pause</command></link> and
|
||||
<link linkend="repmgr-service-unpause"><command>repmgr service unpause</command></link>
|
||||
<emphasis>do not</emphasis> stop/start &repmgrd;.
|
||||
</para>
|
||||
</note>
|
||||
</sect2>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<simpara>
|
||||
ability to <link linkend="repmgrd-pausing">pause repmgrd</link>
|
||||
operation on all nodes with a
|
||||
<link linkend="repmgr-daemon-pause"><command>single command</command></link>
|
||||
<link linkend="repmgr-service-pause"><command>single command</command></link>
|
||||
</simpara>
|
||||
</listitem>
|
||||
|
||||
|
||||
@@ -317,7 +317,9 @@
|
||||
</para>
|
||||
<para>
|
||||
If &repmgrd; is in use, it's worth double-checking that
|
||||
all nodes are unpaused by executing <command><link linkend="repmgr-daemon-status">repmgr-daemon-status</link></command>.
|
||||
all nodes are unpaused by executing
|
||||
<command><link linkend="repmgr-service-status">repmgr service status</link></command>
|
||||
(&repmgr; 4.2 - 4.4: <command><link linkend="repmgr-service-status">repmgr daemon status</link></command>).
|
||||
</para>
|
||||
|
||||
<note>
|
||||
|
||||
@@ -216,7 +216,9 @@ ALTER EXTENSION repmgr UPDATE</programlisting>
|
||||
<secondary>checking repmgrd status</secondary>
|
||||
</indexterm>
|
||||
<para>
|
||||
From <link linkend="release-4.2">repmgr 4.2</link>, once the upgrade is complete, execute the <command><link linkend="repmgr-daemon-status">repmgr daemon status</link></command>
|
||||
From <link linkend="release-4.2">repmgr 4.2</link>, once the upgrade is complete, execute the
|
||||
<command><link linkend="repmgr-service-status">repmgr service status</link></command>
|
||||
(&repmgr; 4.2 - 4.4: <command><link linkend="repmgr-service-status">repmgr daemon status</link></command>)
|
||||
command (on any node) to show an overview of the status of &repmgrd; on all nodes.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
Reference in New Issue
Block a user