mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
doc: document "child_node..." configuration parameters
This commit is contained in:
@@ -204,7 +204,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Every few seconds (defined by the configuration parameter <varname>child_nodes_check_interval</varname>;
|
||||
a value of <literal>0</literal> disables this altogether), <application>repmgrd</application> queries
|
||||
default: <literal>5</literal> seconds, a value of <literal>0</literal> disables this altogether), <application>repmgrd</application> queries
|
||||
the <literal>pg_stat_replication</literal> system view and compares
|
||||
the nodes present there against the list of nodes registered with &repmgr; which
|
||||
should be attached to the primary.
|
||||
@@ -240,7 +240,7 @@
|
||||
<filename>repmgr.conf</filename>, <application>repmgrd</application> will then loop through all child nodes.
|
||||
If it determines that insufficient child nodes are connected, and a
|
||||
minimum of <varname>child_nodes_disconnect_timeout</varname> seconds (default: <literal>30</literal>)
|
||||
has elapsed since the last node became disconnected, <application>repmgrd</application> will then execute the
|
||||
has elapsed since the last node became disconnected, <application>repmgrd</application> will then execute the
|
||||
<varname>child_nodes_disconnect_command</varname> script.
|
||||
</para>
|
||||
<para>
|
||||
@@ -252,16 +252,6 @@
|
||||
is connected). Alternatively, if <varname>child_nodes_disconnect_min_count</varname>
|
||||
and more than that number of child nodes disconnects, the script will be triggered.
|
||||
</para>
|
||||
<para>
|
||||
The <varname>child_nodes_disconnect_command</varname> script will only be executed once
|
||||
while the criteria for its execution are met. If the criteria for its execution are no longer
|
||||
met (i.e. some child nodes have reconnected), it will be executed again if
|
||||
the criteria for its execution are met again.
|
||||
</para>
|
||||
<para>
|
||||
The <varname>child_nodes_disconnect_command</varname> script will not be executed if
|
||||
<application>repmgrd</application> is paused.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
@@ -285,7 +275,165 @@
|
||||
<sect2 id="repmgrd-primary-child-disconnection-configuration">
|
||||
<title>Standby disconnections monitoring process configuration</title>
|
||||
<para>
|
||||
The following parameters, set in <filename>repmgr.conf</filename>,
|
||||
control how child node disconnection monitoring operates.
|
||||
</para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_check_interval</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_check_interval</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Interval (in seconds) after which <application>repmgrd</application> queries the
|
||||
<literal>pg_stat_replication</literal> system view and compares the nodes present
|
||||
there against the list of nodes registered with repmgr which should be attached to the primary.
|
||||
</para>
|
||||
<para>
|
||||
Default is <literal>5</literal> seconds, a value of <literal>0</literal> disables this check
|
||||
altogether.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_command</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_disconnect_command</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
User-definable script to be executed when <application>repmgrd</application>
|
||||
determines that an insufficient number of child nodes are connected. By default
|
||||
the script is executed when no child nodes are executed, but the execution
|
||||
threshold can be modified by setting one of <varname>child_nodes_connected_min_count</varname>
|
||||
or<varname>child_nodes_disconnect_min_count</varname> (see below).
|
||||
</para>
|
||||
<para>
|
||||
The <varname>child_nodes_disconnect_command</varname> script can be
|
||||
any user-defined script or program. It <emphasis>must</emphasis> be able
|
||||
to be executed by the system user under which the PostgreSQL server itself
|
||||
runs (usually <literal>postgres</literal>).
|
||||
</para>
|
||||
<para>
|
||||
If specified, the following format placeholder will be substituted when
|
||||
executing <varname>child_nodes_disconnect_command</varname>:
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>%p</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
ID of the node executing the <varname>child_nodes_disconnect_command</varname> script.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<para>
|
||||
The <varname>child_nodes_disconnect_command</varname> script will only be executed once
|
||||
while the criteria for its execution are met. If the criteria for its execution are no longer
|
||||
met (i.e. some child nodes have reconnected), it will be executed again if
|
||||
the criteria for its execution are met again.
|
||||
</para>
|
||||
<para>
|
||||
The <varname>child_nodes_disconnect_command</varname> script will not be executed if
|
||||
<application>repmgrd</application> is <link linkend="repmgrd-pausing">paused</link>.
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_timeout</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_disconnect_timeout</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If <application>repmgrd</application> determines that an insufficient number of
|
||||
child nodes are connected, it will wait for the specified number of seconds
|
||||
to execute the <varname>child_nodes_disconnect_command</varname>.
|
||||
</para>
|
||||
<para>
|
||||
Default: <literal>30</literal> seconds.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_connected_min_count</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_connected_min_count</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the number of child nodes connected falls below the number specified in
|
||||
this parameter, the <varname>child_nodes_disconnect_command</varname> script
|
||||
will be executed.
|
||||
</para>
|
||||
<para>
|
||||
For example, if <varname>child_nodes_connected_min_count</varname> is set
|
||||
to <literal>2</literal>, the <varname>child_nodes_disconnect_command</varname>
|
||||
script will be executed if one or no child nodes are connected.
|
||||
</para>
|
||||
<para>
|
||||
Note that <varname>child_nodes_connected_min_count</varname> overrides any value
|
||||
set in <varname>child_nodes_disconnect_min_count</varname>.
|
||||
</para>
|
||||
<para>
|
||||
If neither of <varname>child_nodes_connected_min_count</varname> or
|
||||
<varname>child_nodes_disconnect_min_count</varname> are set,
|
||||
the <varname>child_nodes_disconnect_command</varname> script
|
||||
will be executed when no child nodes are connected.
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_min_count</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_disconnect_min_count</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the number of disconnected child nodes exceeds the number specified in
|
||||
this parameter, the <varname>child_nodes_disconnect_command</varname> script
|
||||
will be executed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For example, if <varname>child_nodes_disconnect_min_count</varname> is set
|
||||
to <literal>2</literal>, the <varname>child_nodes_disconnect_command</varname>
|
||||
script will be executed if more than two child nodes are disconnected.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that any value set in <varname>child_nodes_disconnect_min_count</varname>
|
||||
will be overriden by <varname>child_nodes_connected_min_count</varname>.
|
||||
</para>
|
||||
<para>
|
||||
If neither of <varname>child_nodes_connected_min_count</varname> or
|
||||
<varname>child_nodes_disconnect_min_count</varname> are set,
|
||||
the <varname>child_nodes_disconnect_command</varname> script
|
||||
will be executed when no child nodes are connected.
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="repmgrd-primary-child-disconnection-events">
|
||||
|
||||
Reference in New Issue
Block a user