Doc: fix indent.
authorBo Peng <pengbo@sraoss.co.jp>
Thu, 21 Jan 2021 07:46:05 +0000 (16:46 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Thu, 21 Jan 2021 07:47:11 +0000 (16:47 +0900)
doc.ja/src/sgml/failover.sgml
doc/src/sgml/failover.sgml
src/sample/scripts/failover.sh.sample

index 68798a1f081c34de36c91266372b3a3c6484d7f5..112455e86a6743da91588a773dcc3efbb44cacaf 100644 (file)
         -->
         <entry>切り離されたノードのデータベースクラスタパス</entry>
        </row>
-       <row>
-        <entry>%M</entry>
-        <!--
-        <entry>Old main node ID</entry>
-        -->
-        <entry>古いメインノードのID</entry>
-       </row>
        <row>
         <entry>%m</entry>
         <!--
         -->
         <entry>新しいメインノードのホスト名</entry>
        </row>
+       <row>
+        <entry>%M</entry>
+        <!--
+        <entry>Old main node ID</entry>
+        -->
+        <entry>古いメインノードのID</entry>
+       </row>
        <row>
         <entry>%P</entry>
         <!--
       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 primary command is needed to execute
-       }
-       if (we need to executed follow primary command)
-       fork a child process
-       (within the child process)
-
-       for each backend node
-       if (the node status in shared memory is down)
-       execute follow primary command
+for each backend node
+{
+    if (the node is not the new primary)
+        set down node status to shared memory status
+        memorize that folllow primary command is needed to execute
+}
+if (we need to executed follow primary command)
+{
+    fork a child process
+    (within the child process)
+
+    for each backend node
+    {
+        if (the node status in shared memory is down)
+            execute follow primary command
+    }
+}
       </programlisting>
      </para>
 
         -->
         <entry>切り離されたノードのデータベースクラスタパス</entry>
        </row>
-       <row>
-        <entry>%M</entry>
-        <!--
-        <entry>Old main node ID</entry>
-        -->
-        <entry>古いメインノードのID</entry>
-       </row>
        <row>
         <entry>%m</entry>
         <!--
         -->
         <entry>新しいプライマリノードのホスト名</entry>
        </row>
+       <row>
+        <entry>%M</entry>
+        <!--
+        <entry>Old main node ID</entry>
+        -->
+        <entry>古いメインノードのID</entry>
+       </row>
        <row>
         <entry>%P</entry>
         <!--
index 1225a5ef7a4b8d08025080bd1a9b0be8a2b3e9ae..03e550c2746ab3ad08aed598f9159e84180de29f 100644 (file)
         <entry>%D</entry>
         <entry>Database cluster directory of the detached node</entry>
        </row>
-       <row>
-        <entry>%M</entry>
-        <entry>Old main node ID</entry>
-       </row>
        <row>
         <entry>%m</entry>
         <entry>New main node ID</entry>
         <entry>%H</entry>
         <entry>Hostname of the new main node</entry>
        </row>
+       <row>
+        <entry>%M</entry>
+        <entry>Old main node ID</entry>
+       </row>
        <row>
         <entry>%P</entry>
         <entry>Old primary node ID</entry>
       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 follow primary command is needed to execute
-       }
-       if (we need to executed follow primary command)
-       fork a child process
-       (within the child process)
-
-       for each backend node
-       if (the node status in shared memory is down)
-       execute follow primary command
+for each backend node
+{
+    if (the node is not the new primary)
+        set down node status to shared memory status
+        memorize that follow primary command is needed to execute
+}
+if (we need to executed follow primary command)
+{
+    fork a child process
+    (within the child process)
+
+    for each backend node
+    {
+        if (the node status in shared memory is down)
+            execute follow primary command
+    }
+}
       </programlisting>
      </para>
 
         <entry>%D</entry>
         <entry>Database cluster directory of the detached node</entry>
        </row>
-       <row>
-        <entry>%M</entry>
-        <entry>Old main node ID</entry>
-       </row>
        <row>
         <entry>%m</entry>
         <entry>New primary node ID</entry>
         <entry>%H</entry>
         <entry>Hostname of the new primary node</entry>
        </row>
+       <row>
+        <entry>%M</entry>
+        <entry>Old main node ID</entry>
+       </row>
        <row>
         <entry>%P</entry>
         <entry>Old primary node ID</entry>
index c2d9d0ebe1dbcd01e6b47e6b153320363e650bb8..5be9dd9d71b1e6f35fa4d66e86a301ce5bfffc91 100755 (executable)
@@ -4,19 +4,19 @@
 set -o xtrace
 
 # Special values:
-#   %d = failed node id
-#   %h = failed node hostname
-#   %p = failed node port number
-#   %D = failed node database cluster path
-#   %m = new main node id
-#   %H = new main node hostname
-#   %M = old main node id
-#   %P = old primary node id
-#   %r = new main port number
-#   %R = new main database cluster path
-#   %N = old primary node hostname
-#   %S = old primary node port number
-#   %% = '%' character
+# 1)  %d = failed node id
+# 2)  %h = failed node hostname
+# 3)  %p = failed node port number
+# 4)  %D = failed node database cluster path
+# 5)  %m = new main node id
+# 6)  %H = new main node hostname
+# 7)  %M = old main node id
+# 8)  %P = old primary node id
+# 9)  %r = new main port number
+# 10) %R = new main database cluster path
+# 11) %N = old primary node hostname
+# 12) %S = old primary node port number
+# 13) %% = '%' character
 
 FAILED_NODE_ID="$1"
 FAILED_NODE_HOST="$2"