repmgr standby switchover: add "%p" event notification parameter

This will contain the node ID of the former primary.
This commit is contained in:
Ian Barwick
2018-01-10 10:58:01 +09:00
parent 5a45997db5
commit 5bd8cf958a
6 changed files with 60 additions and 22 deletions

View File

@@ -63,7 +63,7 @@
<term><option>%s</option></term>
<listitem>
<para>
success (1 or 0)
success (1) or failure (0)
</para>
</listitem>
</varlistentry>
@@ -84,6 +84,17 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>%p</option></term>
<listitem>
<para>
node ID of the demoted standby (<xref linkend="repmgr-standby-switchover"> only)
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
The values provided for <literal>%t</literal> and <literal>%d</literal>

View File

@@ -109,9 +109,14 @@
<title>Event notifications</title>
<para>
<literal>standby_switchover</literal> and <literal>standby_promote</literal>
<link linkend="event-notifications">event notification</link> will be generated for the new primary,
<link linkend="event-notifications">event notifications</link> will be generated for the new primary,
and a <literal>node_rejoin</literal> event notification for the former primary (new standby).
</para>
<para>
If using an event notification script, <literal>standby_switchover</literal>
will populate the placeholder parameter <literal>%p</literal> with the node ID of
the former standby.
</para>
</refsect1>