mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
docs: add sample output to "standby follow" and "standby promote"
This commit is contained in:
@@ -14,6 +14,14 @@
|
|||||||
a standby to the current primary, not another standby.
|
a standby to the current primary, not another standby.
|
||||||
</simpara>
|
</simpara>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
|
<tip>
|
||||||
|
<para>
|
||||||
|
If the node is running and needs to be attached to the current primary, use
|
||||||
|
<xref linkend="repmgr-standby-follow">.
|
||||||
|
</para>
|
||||||
|
</tip>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This can optionally use <application>pg_rewind</application> to re-integrate a node which has diverged
|
This can optionally use <application>pg_rewind</application> to re-integrate a node which has diverged
|
||||||
from the rest of the cluster, typically a failed primary.
|
from the rest of the cluster, typically a failed primary.
|
||||||
|
|||||||
@@ -11,11 +11,25 @@
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
This command will force a restart of the standby server, which must be
|
This command will force a restart of the standby server, which must be
|
||||||
running. It can only be used to attach a standby to a new primary node.
|
running. It can only be used to attach an active standby to the current primary node
|
||||||
|
(and not to another standby).
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
To re-add an inactive node to the replication cluster, see
|
To re-add an inactive node to the replication cluster, see
|
||||||
<xref linkend="repmgr-node-rejoin">
|
<xref linkend="repmgr-node-rejoin">
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
Example execution:
|
||||||
|
<programlisting>
|
||||||
|
$ repmgr -f /etc/repmgr.conf standby follow
|
||||||
|
INFO: setting node 3's primary to node 2
|
||||||
|
NOTICE: restarting server using "pg_ctl -l /var/log/postgres/startup.log -w -D '/var/lib/postgres/data' restart"
|
||||||
|
waiting for server to shut down........ done
|
||||||
|
server stopped
|
||||||
|
waiting for server to start.... done
|
||||||
|
server started
|
||||||
|
NOTICE: STANDBY FOLLOW successful
|
||||||
|
DETAIL: node 3 is now attached to node 2</programlisting>
|
||||||
|
</para>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
|||||||
@@ -15,4 +15,16 @@
|
|||||||
by using <xref linkend="repmgr-standby-follow">; if <application>repmgrd</application>
|
by using <xref linkend="repmgr-standby-follow">; if <application>repmgrd</application>
|
||||||
is active, it will handle this automatically.
|
is active, it will handle this automatically.
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
Example execution:
|
||||||
|
<programlisting>
|
||||||
|
$ repmgr -f /etc/repmgr.conf standby promote
|
||||||
|
NOTICE: promoting standby to primary
|
||||||
|
DETAIL: promoting server "node2" (ID: 2) using "pg_ctl -l /var/log/postgres/startup.log -w -D '/var/lib/postgres/data' promote"
|
||||||
|
server promoting
|
||||||
|
DEBUG: setting node 2 as primary and marking existing primary as failed
|
||||||
|
NOTICE: STANDBY PROMOTE successful
|
||||||
|
DETAIL: server "node2" (ID: 2) was successfully promoted to primary
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
[2017-08-24 23:32:12] [NOTICE] this node is the winner, will now promote self and inform other nodes
|
[2017-08-24 23:32:12] [NOTICE] this node is the winner, will now promote self and inform other nodes
|
||||||
INFO: connecting to standby database
|
INFO: connecting to standby database
|
||||||
NOTICE: promoting standby
|
NOTICE: promoting standby
|
||||||
DETAIL: promoting server using '/home/barwick/devel/builds/HEAD/bin/pg_ctl -l /tmp/postgres.5602.log -w -D '/tmp/repmgr-test/node_2/data' promote'
|
DETAIL: promoting server using '/home/barwick/devel/builds/HEAD/bin/pg_ctl -l /var/log/postgres/startup.log -w -D '/tmp/repmgr-test/node_2/data' promote'
|
||||||
INFO: reconnecting to promoted server
|
INFO: reconnecting to promoted server
|
||||||
NOTICE: STANDBY PROMOTE successful
|
NOTICE: STANDBY PROMOTE successful
|
||||||
DETAIL: node 2 was successfully promoted to primary
|
DETAIL: node 2 was successfully promoted to primary
|
||||||
|
|||||||
Reference in New Issue
Block a user