repmgrd: add %p event notification parameter for "repmgrd_failover_promote"

This enables an event notification script to identify the former primary
node.
This commit is contained in:
Ian Barwick
2021-09-28 10:24:13 +09:00
parent f152fc3016
commit 7862941300
4 changed files with 37 additions and 15 deletions

View File

@@ -77,7 +77,16 @@
status.
</para>
</listitem>
<listitem>
<para>
Add <literal>%p</literal> <link linkend="event-notifications">event notification parameter</link>
providing the node ID of the former primary for the <literal>repmgrd_failover_promote</literal> event.
</para>
</listitem>
</itemizedlist>
</para>
</sect2>

View File

@@ -95,7 +95,8 @@
</para>
<para>
The following parameters are provided for a subset of event notifications:
The following parameters are provided for a subset of event notifications; their meaning may
change according to context:
</para>
<variablelist>
@@ -108,6 +109,9 @@
<para>
node ID of the demoted primary (<xref linkend="repmgr-standby-switchover"/> only)
</para>
<para>
node ID of the former primary (<literal>repmgrd_failover_promote</literal> only)
</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -133,7 +137,7 @@
<para>
The values provided for <literal>%c</literal> and <literal>%a</literal>
will probably contain spaces, so should always be quoted.
may contain spaces, so should always be quoted.
</para>
<para>