Doc: add failover_command description
authorTakuma Hoshiai <hoshiai@sraoss.co.jp>
Tue, 15 Oct 2019 09:39:30 +0000 (18:39 +0900)
committerTakuma Hoshiai <hoshiai@sraoss.co.jp>
Tue, 15 Oct 2019 09:39:30 +0000 (18:39 +0900)
Add more exaplain about a case that failover_command execute when it
does not have a new master node. In this case, special characters in
failover_command are specified fixed values.

doc.ja/src/sgml/failover.sgml
doc/src/sgml/failover.sgml

index 946f3333032425bb157c8524fb33bdef5b4712c6..62d208b9704f8c261f571dc933eb90023b7fbd4f 100644 (file)
       </tgroup>
      </table>
 
+     <note>
+      <para>
+       <!--
+       The "master node" refers to a node which has the
+       "youngest (or the smallest) node id" among live the
+       database nodes. In <link linkend="running-mode">streaming
+       replication mode</link>, this may be different from
+       primary node. In <xref linkend="failover-command-table">,
+       %m is the new master node chosen
+       by <productname>Pgpool-II</productname>. It is the node
+       being assigned the youngest (smallest) node id which is
+       alive. For example if you have 3 nodes, namely node 0, 1,
+       2. Suppose node 1 the primary and all of them are healthy
+       (no down node). If node 1 fails, failover_command is
+       called with %m = 0. And, if all standby nodes are down and primary node
+       failover happens, failover_command is called with %m = -1 and %H,%R,$r = "".
+       -->
+       マスターノードは、生きているデータベースノードの中から一番若い(小さい)ノードIDを持つノードを参照します。
+       <link linkend="running-mode">ストリーミングレプリケーションモード</link>では、このノードはプライマリノードとは異なる場合があります。
+       <xref linkend="failover-command-table">内では、 %mは<productname>Pgpool-II</productname>によって選出された新しいマスターノードとなります。
+       新しいマスターノードには生きているノードで一番若い(小さい)ノードが割り当てられます。
+       例えば、ノード0、1、2という3つのノードを持ち、ノード1がプライマリノード、全てのノードは正常である(ダウンしているノードがない)と仮定します。
+      ノード1がダウンした場合、failover_command は %m = 0 で呼び出されます。
+      また、全てのスタンバイノードがダウンした状態でプライマリノードのフェイルオーバが起きた場合、failover_commandは %m = -1、および%H,%R,%r = "" で呼び出されます。
+      </para>
+     </note>
+
      <note>
       <para>
        <!--
index 88f049114c5f483464b3bd9cf87db8f30a319573..5e403a8c4555667d4272a9abc17459feb3a2e487 100644 (file)
        alive. For example if you have 3 nodes, namely node 0, 1,
        2. Suppose node 1 the primary and all of them are healthy
        (no down node). If node 1 fails, failover_command is
-       called with %m = 0.
+       called with %m = 0. And, if all standby nodes are down and primary node
+       failover happens, failover_command is called with %m = -1 and %H,%R,$r = "".
       </para>
      </note>