pgpool2.git / summary / log / commit / refs
commit cad8a512d63dab7659c7288356f9cb5ffc331b92
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Tue Mar 05 14:59:49 2019 +0000
Doc: add more explanation to follow_master_command.
Add description how follow_master_command is executed etc.
doc/src/sgml/failover.sgml | 35 +++++++++++++++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/failover.sgml b/doc/src/sgml/failover.sgml
index 033b6922a..64cf7e227 100644
--- a/doc/src/sgml/failover.sgml
+++ b/doc/src/sgml/failover.sgml
@@ -249,8 +249,39 @@
<listitem>
<para>
- Specifies a user command to run after failover on the primary node failover.
- This works only in Master Replication mode with streaming replication.
+ Specifies a user command to run after failover on the
+ primary node failover. In case of standby node failover, the
+ command will not be executed. This command also runs if a
+ node promote request is issued by
+ <xref linkend="PCP-PROMOTE-NODE"> command. This works only
+ in Master Replication mode with streaming replication.
+ </para>
+
+ <para>
+ Since the command is executed within a child process forked
+ off by <productname>Pgpool-II</productname> after failover
+ is completed, execution of follow master command does not
+ block the service
+ of <productname>Pgpool-II</productname>. Here is a pseud
+ code to illustrate how the command is executed:
+ <programlisting>
+for each backend node
+{
+ if (the node is not the new primary)
+ set down node status to shared memory status
+ memorize that folllow master command is needed to execute
+}
+if (we need to executed follow master command)
+ fork a child process
+ (within the child process)
+
+ for each backend node
+ if (the node status in shared memory is down)
+ execute follow master command
+ </programlisting>
+ </para>
+
+ <para>
<productname>Pgpool-II</productname> replaces the following special characters
with the backend specific information before excuting the command.
</para>
[parent: 0df1874d29e9]