Doc: Update configuration example to 4.6 and PostgreSQL 17.
authorBo Peng <pengbo@sraoss.co.jp>
Mon, 10 Feb 2025 09:12:03 +0000 (18:12 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Mon, 10 Feb 2025 09:12:03 +0000 (18:12 +0900)
This commit includes:
- update configuration example to 4.6 and PostgreSQL 17
- update OS to Rocky Linux 9

doc.ja/src/sgml/example-cluster.sgml
doc/src/sgml/example-cluster.sgml

index fbfd504a0117cd22b64c36a27a8bbd60824b5021..f22fc4ac7de0fb179a9247173486ad5323305d15 100644 (file)
@@ -7,7 +7,7 @@
   ใ“ใฎ่จญๅฎšไพ‹ใงใฏใ€3ๅฐใฎ<productname>Pgpool-II</productname>ใ‚’ไฝฟใฃใฆ<productname>PostgreSQL</productname>๏ผˆใƒ—ใƒฉใ‚คใƒžใƒช1ๅฐใ€ใ‚นใ‚ฟใƒณใƒใ‚ค2ๅฐ๏ผ‰ใ‚’็ฎก็†ใ—ใ€ๅ˜ไธ€้šœๅฎณ็‚นใ‚„ใ‚นใƒ—ใƒชใƒƒใƒˆใƒ–ใƒฌใ‚คใƒณใฎ่ตทใใชใ„ๅ …็‰ขใชใ‚ฏใƒฉใ‚นใ‚ฟใ‚’้‹็”จใ™ใ‚‹ใ“ใจใŒๅฏ่ƒฝใงใ™ใ€‚
  </para>
  <para>
-  ใ“ใฎ่จญๅฎšไพ‹ใงใฏ<productname>PostgreSQL</productname> 16ใ‚’ไฝฟใฃใฆใ„ใพใ™ใŒใ€
+  ใ“ใฎ่จญๅฎšไพ‹ใงใฏ<emphasis><productname>PostgreSQL</productname> 17</emphasis>ใ‚’ไฝฟใฃใฆใ„ใพใ™ใŒใ€
   ๅ„็จฎใ‚นใ‚ฏใƒชใƒ—ใƒˆใฏ<productname>PostgreSQL</productname> 10ไปฅ้™ใงใฎๅ‹•ไฝœ็ขบ่ชใ‚’่กŒใฃใฆใ„ใพใ™ใ€‚
  </para>
  <sect2 id="example-cluster-requirement">
@@ -22,7 +22,7 @@
   <title>ๅ…จไฝ“ๆง‹ๆˆ</title>
   <para>
    ไปŠๅ›žใฏใ€Linuxใ‚ตใƒผใƒใ‚’3ๅฐ็”จๆ„ใ—ใ€ใใ‚Œใžใ‚Œใฎใƒ›ใ‚นใƒˆๅใฏ<literal>server1</literal>ใ€<literal>server2</literal>ใ€<literal>server3</literal>ใจใ—ใพใ™ใ€‚
-   ไฝฟ็”จใ™ใ‚‹OSใฏใ™ในใฆRocky Linux 8ใจใ—ใพใ™ใ€‚
+   ไฝฟ็”จใ™ใ‚‹OSใฏใ™ในใฆ<emphasis>Rocky Linux 9</emphasis>ใจใ—ใพใ™ใ€‚
    ใใ‚Œใžใ‚Œใฎใ‚ตใƒผใƒใซ<productname>PostgreSQL</productname>ใจ<productname>Pgpool-II</productname>ใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ—ใพใ™ใ€‚
    3ๅฐใฎ<productname>PostgreSQL</productname>ใŒใ‚นใƒˆใƒชใƒผใƒŸใƒณใ‚ฐใƒฌใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณๆง‹ๆˆใซใชใ‚Šใพใ™ใ€‚ๅ…จไฝ“ๆง‹ๆˆๅ›ณใฏไปฅไธ‹ใฎ้€šใ‚Šใงใ™ใ€‚
   </para>
@@ -83,7 +83,7 @@
     <tbody>
      <row>
       <entry>PostgreSQLใƒใƒผใ‚ธใƒงใƒณ</entry>
-      <entry>16.0</entry>
+      <entry>17.0</entry>
       <entry>-</entry>
      </row>
      <row>
      </row>
      <row>
       <entry>$PGDATA</entry>
-      <entry>/var/lib/pgsql/16/data</entry>
+      <entry>/var/lib/pgsql/17/data</entry>
       <entry>-</entry>
      </row>
      <row>
       <entry>ใ‚ขใƒผใ‚ซใ‚คใƒ–ใƒขใƒผใƒ‰</entry>
-      <entry>ๆœ‰ๅŠน</entry>
-      <entry>/var/lib/pgsql/archivedir</entry>
+      <entry>็„กๅŠน</entry>
+      <entry>-</entry>
      </row>
      <row>
       <entry>ใƒฌใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใ‚นใƒญใƒƒใƒˆ</entry>
     <tbody>
      <row>
       <entry>Pgpool-IIใƒใƒผใ‚ธใƒงใƒณ</entry>
-      <entry>4.5.0</entry>
+      <entry>4.6.0</entry>
       <entry>-</entry>
      </row>
      <row>
     <tbody>
      <row>
       <entry morerows='1'>่‡ชๅ‹•ใƒ•ใ‚งใ‚คใƒซใ‚ชใƒผใƒ</entry>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/failover.sh.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/failover.sh.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/failover.sh.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/failover.sh.sample</ulink></entry>
       <entry>ใƒ•ใ‚งใ‚คใƒซใ‚ชใƒผใƒใ‚’ๅฎŸ่กŒใ™ใ‚‹ใ‚นใ‚ฏใƒชใƒ—ใƒˆใ€‚<xref linkend="GUC-FAILOVER-COMMAND">ใงไฝฟ็”จใ—ใพใ™ใ€‚</entry>
      </row>
      <row>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/follow_primary.sh.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/follow_primary.sh.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/follow_primary.sh.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/follow_primary.sh.sample</ulink></entry>
       <entry>ไธŠ่จ˜ใƒ•ใ‚งใ‚คใƒซใ‚ชใƒผใƒใ‚นใ‚ฏใƒชใƒ—ใƒˆใŒๅฎŸ่กŒใ•ใ‚ŒใŸๅพŒใซใ€ๆ–ฐใ—ใ„ใƒ—ใƒฉใ‚คใƒžใƒชใ‚ตใƒผใƒใจใ‚นใ‚ฟใƒณใƒใ‚คใ‚ตใƒผใƒใ‚’ๅŒๆœŸใ•ใ›ใ‚‹ใ‚นใ‚ฏใƒชใƒ—ใƒˆใ€‚<xref linkend="GUC-FOLLOW-PRIMARY-COMMAND">ใงไฝฟ็”จใ—ใพใ™ใ€‚ PostgreSQLใ‚ตใƒผใƒใŒ2ๅฐใฎๅ ดๅˆใฏใ“ใฎใ‚นใ‚ฏใƒชใƒ—ใƒˆใฎ่จญๅฎšใฏไธ่ฆใงใ™ใ€‚</entry>
      </row>
      <row>
       <entry morerows='1'>ใ‚ชใƒณใƒฉใ‚คใƒณใƒชใ‚ซใƒใƒช</entry>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/recovery_1st_stage.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/recovery_1st_stage.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/recovery_1st_stage.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/recovery_1st_stage.sample</ulink></entry>
       <entry>ใ‚นใ‚ฟใƒณใƒใ‚คใ‚ตใƒผใƒใ‚’ใƒชใ‚ซใƒใƒชใ™ใ‚‹ใ‚นใ‚ฏใƒชใƒ—ใƒˆใ€‚<xref linkend="GUC-RECOVERY-1ST-STAGE-COMMAND">ใงไฝฟ็”จใ—ใพใ™ใ€‚</entry>
      </row>
      <row>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/pgpool_remote_start.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/pgpool_remote_start.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/pgpool_remote_start.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/pgpool_remote_start.sample</ulink></entry>
       <entry>ไธŠ่จ˜<xref linkend="GUC-RECOVERY-1ST-STAGE-COMMAND">ใŒๅฎŸ่กŒใ•ใ‚ŒใŸๅพŒใซใ€ใ‚นใ‚ฟใƒณใƒใ‚คใƒŽใƒผใƒ‰ใ‚’่ตทๅ‹•ใ•ใ›ใ‚‹ใ‚นใ‚ฏใƒชใƒ—ใƒˆใ€‚</entry>
      </row>
      <row>
       <entry morerows='1'>Watchdog</entry>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/escalation.sh.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/escalation.sh.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/escalation.sh.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/escalation.sh.sample</ulink></entry>
       <entry>
        ไปปๆ„ใฎ่จญๅฎšใ€‚Pgpool-IIใฎใƒชใƒผใƒ€ใƒผ/ใ‚นใ‚ฟใƒณใƒใ‚คๅˆ‡ใ‚Šๆ›ฟใˆๆ™‚ใซใ€ๆ—งWatchdogใƒชใƒผใƒ€ใƒผใƒ—ใƒญใ‚ปใ‚นใฎ็•ฐๅธธ็ต‚ไบ†ใซใ‚ˆใฃใฆๆ—งWatchdogใƒชใƒผใƒ€ใƒผใงไปฎๆƒณIPใŒ่ตทๅ‹•ใ—ใŸใพใพใ€ๆ–ฐใ—ใ„ใƒชใƒผใƒ€ใƒผใƒŽใƒผใƒ‰ใงไปฎๆƒณIPใŒ่ตทๅ‹•ใ•ใ‚Œใ‚‹ใ“ใจใ‚’้˜ฒใใŸใ‚ใซใ€ๆ–ฐใ—ใ„ใƒชใƒผใƒ€ใƒผไปฅๅค–ใง่ตทๅ‹•ใ—ใฆใ„ใ‚‹ไปฎๆƒณIPใ‚’ๅœๆญขใ™ใ‚‹ใ‚นใ‚ฏใƒชใƒ—ใƒˆใ€‚<xref linkend="guc-wd-escalation-command">ใงไฝฟ็”จใ—ใพใ™ใ€‚
       </entry>
    <productname>PostgreSQL</productname>ใฎใ‚คใƒณใ‚นใƒˆใƒผใƒซใฏ<productname>PostgreSQL</productname>ใ‚ณใƒŸใƒฅใƒ‹ใƒ†ใ‚ฃใฎใƒชใƒใ‚ธใƒˆใƒชใ‚’ไฝฟใ„ใพใ™ใ€‚
   </para>
   <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
+[ๅ…จใ‚ตใƒผใƒ]# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
 [ๅ…จใ‚ตใƒผใƒ]# dnf -qy module disable postgresql
-[ๅ…จใ‚ตใƒผใƒ]# dnf install -y postgresql16-server
+[ๅ…จใ‚ตใƒผใƒ]# dnf install -y postgresql17-server
   </programlisting>
 
   <para>
 exclude=pgpool*
 
 
+[pgdg17]
+...
+exclude=pgpool*
+
 [pgdg16]
 ...
 exclude=pgpool*
@@ -270,19 +274,18 @@ exclude=pgpool*
 
 [pgdg12]
 ...
-exclude=pgpool*
-
-[pgdg11]
-...
 exclude=pgpool*
   </programlisting>
 
   <para>
    <productname>Pgpool-II</productname>ใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ—ใพใ™ใ€‚
+   <productname>Pgpool-II</productname>ใฎใ‚คใƒณใ‚นใƒˆใƒผใƒซใซๅฟ…่ฆใชlibmemcachedใƒฉใ‚คใƒ–ใƒฉใƒชใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ™ใ‚‹ใŸใ‚ใซใ€<literal>crb</literal>ใƒชใƒใ‚ธใƒˆใƒชใ‚’ๆœ‰ๅŠนใซใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚
+   <literal>Rocky Linux 8</literal>ใ‚’ไฝฟ็”จใ™ใ‚‹ๅ ดๅˆใ€<literal>crb</literal>ใƒชใƒใ‚ธใƒˆใƒชใงใฏใชใใ€<literal>powertools</literal>ใƒชใƒใ‚ธใƒˆใƒชใ‚’ไฝฟ็”จใ—ใฆใใ ใ•ใ„ใ€‚
+   
   </para>
   <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# dnf install -y https://www.pgpool.net/yum/rpms/4.5/redhat/rhel-8-x86_64/pgpool-II-release-4.5-1.noarch.rpm
-[ๅ…จใ‚ตใƒผใƒ]# dnf install -y pgpool-II-pg16-*
+[ๅ…จใ‚ตใƒผใƒ]# dnf install -y https://www.pgpool.net/yum/rpms/4.6/redhat/rhel-9-x86_64/pgpool-II-release-4.6-1.noarch.rpm
+[ๅ…จใ‚ตใƒผใƒ]# dnf install -y --enablerepo=crb pgpool-II-pg17-*
   </programlisting>
  </sect2>
 
@@ -292,49 +295,103 @@ exclude=pgpool*
   Pgpool-IIใฎ่จญๅฎšใฎๅ‰ใซใ€ไปฅไธ‹ใฎ่จญๅฎšใ‚’่กŒใฃใฆใใ ใ•ใ„ใ€‚
   </para>
 
-  <sect3 id="example-cluster-before-starting-primary">
-   <title>ใƒ—ใƒฉใ‚คใƒžใƒชใฎใ‚ปใƒƒใƒˆใ‚ขใƒƒใƒ—</title>
+  <sect3 id="example-cluster-before-starting-ssh">
+   <title>SSHๅ…ฌ้–‹้ต่ช่จผใฎ่จญๅฎš</title>
+    <para>
+     ่‡ชๅ‹•ใƒ•ใ‚งใ‚คใƒซใ‚ชใƒผใƒใ€ใ‚ชใƒณใƒฉใ‚คใƒณใƒชใ‚ซใƒใƒชๆฉŸ่ƒฝใ‚’ๅˆฉ็”จใ™ใ‚‹ใซใฏใ€ใ™ในใฆใฎ<productname>Pgpool-II</productname>ใƒŽใƒผใƒ‰้–“ใง<literal>postgres</literal>ใƒฆใƒผใ‚ถ๏ผˆPgpool-IIใฎใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฎ่ตทๅ‹•ใƒฆใƒผใ‚ถใ€‚Pgpool-II 4.0ไปฅๅ‰ใ€ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฎ่ตทๅ‹•ใƒฆใƒผใ‚ถใฏ<literal>root</literal>๏ผ‰ใจใ—ใฆๅŒๆ–นๅ‘ใซSSHๅ…ฌ้–‹้ต่ช่จผ๏ผˆใƒ‘ใ‚นใƒฏใƒผใƒ‰ใชใ—๏ผ‰ใงๆŽฅ็ถšใงใใ‚‹ใ‚ˆใ†ใซ่จญๅฎšใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚ 
+    </para>
     <para>
-     <productname>PostgreSQL</productname>ใƒ—ใƒฉใ‚คใƒžใƒชใ‚ตใƒผใƒใงใ‚นใƒˆใƒชใƒผใƒŸใƒณใ‚ฐใƒฌใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใฎ่จญๅฎšใ‚’่กŒใ„ใพใ™ใ€‚
-     ใ“ใฎ่จญๅฎšใฎไพ‹ใงใฏใ‚ขใƒผใ‚ซใ‚คใƒ–ใƒชใ‚ซใƒใƒชใ‚’่กŒใ†ใ‚ˆใ†ใซ่จญๅฎšใ—ใพใ™ใ€‚
     </para>
     <para>
-     ใพใšใ€ใ™ในใฆใฎใ‚ตใƒผใƒใซใฆ<acronym>WAL</acronym>ใ‚’ๆ ผ็ดใ™ใ‚‹ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒช<filename>/var/lib/pgsql/archivedir</filename>ใ‚’ไบ‹ๅ‰ใซไฝœๆˆใ—ใพใ™ใ€‚ใ“ใฎ่จญๅฎšไพ‹ใงใฏใ€ใƒ—ใƒฉใ‚คใƒžใƒชใ‚ตใƒผใƒใฎใฟใง<acronym>WAL</acronym>ใ‚ขใƒผใ‚ซใ‚คใƒ–ใ‚’ใƒญใƒผใ‚ซใƒซใงๅฎŸๆ–ฝใ—ใพใ™ใ€‚
+     ใพใšใ€ๅ…จใ‚ตใƒผใƒใงไปฅไธ‹ใฎใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ—ใ€SSH้ตใƒ•ใ‚กใ‚คใƒซใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
+     ใ“ใฎ่จญๅฎšไพ‹ใงใฏ็”Ÿๆˆใ•ใ‚Œใ‚‹้ตใƒ•ใ‚กใ‚คใƒซๅใฏ<literal>id_rsa_pgpool</literal>ใจใ—ใพใ™ใ€‚
     </para>
     <programlisting>
 [ๅ…จใ‚ตใƒผใƒ]# su - postgres
-[ๅ…จใ‚ตใƒผใƒ]$ mkdir /var/lib/pgsql/archivedir
+[ๅ…จใ‚ตใƒผใƒ]$ mkdir ~/.ssh && chmod 700 ~/.ssh
+[ๅ…จใ‚ตใƒผใƒ]$ ssh-keygen -t rsa -f ~/.ssh/id_rsa_pgpool
     </programlisting>
+    <para>
+     ๆฌกใซใ€ๅ…ฌ้–‹้ต<literal>id_rsa_pgpool.pub</literal>ใ‚’ๅ„ใ‚ตใƒผใƒใฎ<filename>/var/lib/pgsql/.ssh/authorized_keys</filename>ใƒ•ใ‚กใ‚คใƒซใซ่ฟฝๅŠ ใ—ใพใ™ใ€‚
+    </para>
+    <para>
+     ่จญๅฎšๅพŒใ€<literal>postgres</literal>ใƒฆใƒผใ‚ถใง<command>ssh postgres@serverX -i ~/.ssh/id_rsa_pgpool</command>ใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ—ใ€ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใชใ—ใงใƒญใ‚ฐใ‚คใƒณใงใใ‚‹ใ“ใจใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚
+    </para>
 
+    <note>
+     <para>
+      ๅ…ฌ้–‹้ต่ช่จผใซใ‚ˆใ‚‹ใƒญใ‚ฐใ‚คใƒณใซๅคฑๆ•—ใ—ใŸๅ ดๅˆใซใฏใ€ไปฅไธ‹ใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚
+      <itemizedlist>
+       <listitem>
+        <para>
+         <filename>/etc/ssh/sshd_config</filename>ใงๅ…ฌ้–‹้ต่ช่จผใŒ่จฑๅฏใ•ใ‚Œใฆใ„ใ‚‹ใ“ใจใ‚’็ขบ่ชใ—ใพใ™ใ€‚
+        </para>
+       </listitem>
+      </itemizedlist>
+      <programlisting>
+PubkeyAuthentication yes
+      </programlisting>
+      <itemizedlist>
+       <listitem>
+        <para>
+         SELinuxใ‚’ๆœ‰ๅŠนๅŒ–ใ—ใฆใ„ใ‚‹ๅ ดๅˆใฏใ€SSHๅ…ฌ้–‹้ต่ช่จผ(ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใชใ—)ใŒๅคฑๆ•—ใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚‹ใฎใงใ€ใ™ในใฆใฎใ‚ตใƒผใƒใงไปฅไธ‹ใฎใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚
+        </para>
+       </listitem>
+      </itemizedlist>
+      <programlisting>
+[ๅ…จใ‚ตใƒผใƒ]# su - postgres
+[ๅ…จใ‚ตใƒผใƒ]$ restorecon -Rv ~/.ssh
+      </programlisting>
+     </para>
+    </note>
+  </sect3>
+
+  <sect3 id="example-cluster-before-starting-firewall">
+   <title>firewallใฎ่จญๅฎš</title>
+   <para>
+    <productname>Pgpool-II</productname>ใ‚„<productname>PostgreSQL</productname>ใซๆŽฅ็ถšใ™ใ‚‹้š›ใซใฏใ€ใƒ•ใ‚กใ‚คใ‚ขใƒผใ‚ฆใ‚ฉใƒผใƒซใซใ‚ˆใฃใฆ็›ฎ็š„ใฎใƒใƒผใƒˆใŒ้–‹ใ‘ใ‚‰ใ‚Œใฆใ„ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚
+    <systemitem>Rocky Linux 9/RHEL 9</systemitem>ใฎๅ ดๅˆใ€ไปฅไธ‹ใฎใ‚ˆใ†ใซ่จญๅฎšใ—ใพใ™ใ€‚
+   </para>
+   <programlisting>
+[ๅ…จใ‚ตใƒผใƒ]# firewall-cmd --permanent --zone=public --add-service=postgresql
+[ๅ…จใ‚ตใƒผใƒ]# firewall-cmd --permanent --zone=public --add-port=9999/tcp --add-port=9898/tcp --add-port=9000/tcp --add-port=9694/udp
+[ๅ…จใ‚ตใƒผใƒ]# firewall-cmd --reload
+   </programlisting>
+  </sect3>
+
+  <sect3 id="example-cluster-before-starting-primary">
+   <title>ใƒ—ใƒฉใ‚คใƒžใƒชใฎใ‚ปใƒƒใƒˆใ‚ขใƒƒใƒ—</title>
     <para>
-     <literal>server1</literal>ใง<productname>PostgreSQL</productname>ใƒ—ใƒฉใ‚คใƒžใƒชใ‚ตใƒผใƒใฎๅˆๆœŸๅŒ–ใ‚’่กŒใ„ใพใ™ใ€‚
+     <literal>server1</literal>ใง<productname>PostgreSQL</productname>ใƒ—ใƒฉใ‚คใƒžใƒชใ‚ตใƒผใƒใฎใ‚ปใƒƒใƒˆใ‚ขใƒƒใƒ—ใ‚’่กŒใ„ใพใ™ใ€‚
+    </para>
+    <para>
+     ใพใšใ€ใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใ‚ฏใƒฉใ‚นใ‚ฟใฎๅˆๆœŸๅŒ–ใ‚’่กŒใ„ใพใ™ใ€‚
+     <productname>PostgreSQL</productname> 17ใงใฏใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใ‚ฏใƒฉใ‚นใ‚ฟใฎใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฎไฝœๆˆๅ…ˆใฏ<filename>/var/lib/pgsql/17/data</filename>ใงใ€<literal>postgres</literal>ใƒฆใƒผใ‚ถใฎ่จญๅฎšใƒ•ใ‚กใ‚คใƒซ<filename>~/.bash_profile</filename>ใง็’ฐๅขƒๅค‰ๆ•ฐ<varname>PGDATA</varname>ใซๆŒ‡ๅฎšใ•ใ‚Œใฆใ„ใพใ™ใ€‚
+     ๅฟ…่ฆใซๅฟœใ˜ใฆๅค‰ๆ›ดใ—ใฆใใ ใ•ใ„ใ€‚
+    </para>
+    <para>
+     <command>initdb</command>ใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ—ใฆใ€ใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใ‚ฏใƒฉใ‚นใ‚ฟใฎๅˆๆœŸๅŒ–ใ‚’่กŒใ„ใพใ™ใ€‚
+     ๅฟ…่ฆใซๅฟœใ˜ใฆใ€<literal>--encoding</literal>ใ‚„<literal>--locale</literal><ulink url="https://www.postgresql.org/docs/17/app-initdb.html">ใ‚ชใƒ—ใ‚ทใƒงใƒณ</ulink>ใ‚’ๆŒ‡ๅฎšใ—ใฆใ€ใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใฎใ‚จใƒณใ‚ณใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚„ใƒญใ‚ฑใƒผใƒซใ‚’่จญๅฎšใ—ใฆใใ ใ•ใ„ใ€‚
     </para>
     <programlisting>
-[server1]# su - postgres
-[server1]$ /usr/pgsql-16/bin/initdb -D $PGDATA
+[root@server1 ~]# su - postgres
+[postgres@server1 ~]$ /usr/pgsql-17/bin/initdb
     </programlisting>
 
     <para>
      ๆฌกใซ<literal>server1</literal>ใง่จญๅฎšใƒ•ใ‚กใ‚คใƒซ<filename>$PGDATA/postgresql.conf</filename>ใ‚’ไปฅไธ‹ใฎใ‚ˆใ†ใซ็ทจ้›†ใ—ใพใ™ใ€‚
-     <application>pg_rewind</application>ใ‚’ไฝฟใ†ใŸใ‚ใซ<varname>wal_log_hints</varname>ใ‚’ๆœ‰ๅŠนใซใ—ใฆใŠใใพใ™ใ€‚
-     ใƒ—ใƒฉใ‚คใƒžใƒชใŒๅพŒใงใ‚นใ‚ฟใƒณใƒใ‚คใซใชใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚‹ใฎใงใ€<literal>hot_standby = on</literal>ใซใ—ใฆใŠใใพใ™ใ€‚
+     <application>pg_rewind</application>ใ‚’ไฝฟใ†ใŸใ‚ใซ<varname>wal_log_hints</varname>ใ‚’ๆœ‰ๅŠนใซใ—ใพใ™ใ€‚
     </para>
     <programlisting>
+[postgres@server1 ~]$ vi $PGDATA/postgresql.conf
 listen_addresses = '*'
-archive_mode = on
-archive_command = 'cp "%p" "/var/lib/pgsql/archivedir/%f"'
-max_wal_senders = 10
-max_replication_slots = 10
-wal_level = replica
-hot_standby = on
 wal_log_hints = on
     </programlisting>
     <para>
-     <literal>server1</literal>ใงPostgreSQLใƒ—ใƒฉใ‚คใƒžใƒชใ‚’่ตทๅ‹•ใ—ใพใ™ใ€‚
+     ๆœ€ๅพŒใซใ€<literal>server1</literal>ใง<productname>PostgreSQL</productname>ใ‚’่ตทๅ‹•ใ—ใพใ™ใ€‚
     </para>
    <programlisting>
-[server1]# su - postgres
-[server1]$ /usr/pgsql-16/bin/pg_ctl start -D $PGDATA
+[postgres@server1 ~]$ /usr/pgsql-17/bin/pg_ctl start
     </programlisting>
   </sect3>
 
@@ -375,7 +432,7 @@ wal_log_hints = on
     </para>
 
     <table id="example-cluster-user">
-     <title>ใƒฆใƒผใ‚ถ</title>
+     <title>PostgreSQLใƒฆใƒผใ‚ถ</title>
      <tgroup cols="3">
       <thead>
        <row>
@@ -408,7 +465,7 @@ wal_log_hints = on
     </table>
 
     <programlisting>
-[server1]# psql -U postgres -p 5432
+[postgres@server1 ~]$ psql
 postgres=# SET password_encryption = 'scram-sha-256';
 postgres=# CREATE ROLE pgpool WITH LOGIN;
 postgres=# CREATE ROLE repl WITH REPLICATION LOGIN;
@@ -422,7 +479,8 @@ postgres=# \password postgres
      ไปฅไธ‹ใฎใ‚ณใƒžใƒณใƒ‰ใง<literal>pgpool</literal>ใƒฆใƒผใ‚ถใ‚’ใใฎใ‚ฐใƒซใƒผใƒ—ใซๆ‰€ๅฑžใ•ใ›ใพใ™ใ€‚
     </para>
     <programlisting>
-GRANT pg_monitor TO pgpool;
+postgres=# GRANT pg_monitor TO pgpool;
+postgres=# \q
     </programlisting>
 
     <note>
@@ -432,66 +490,15 @@ GRANT pg_monitor TO pgpool;
     </note>
 
     <para>
-     <productname>Pgpool-II</productname>ใ‚ตใƒผใƒใจ<productname>PostgreSQL</productname>ใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰ใ‚ตใƒผใƒใŒๅŒใ˜ใ‚ตใƒ–ใƒใƒƒใƒˆใƒฏใƒผใ‚ฏใซใ‚ใ‚‹ใ“ใจใ‚’ๆƒณๅฎšใ—ใ€ๅ„ใƒฆใƒผใ‚ถใŒ<acronym>scram-sha-256</acronym>่ช่จผๆ–นๅผใงๆŽฅ็ถšใ™ใ‚‹ใ‚ˆใ†ใซใ€<filename>pg_hba.conf</filename>ใ‚’็ทจ้›†ใ—ใฆใŠใใพใ™ใ€‚
+     ใ“ใฎ่จญๅฎšไพ‹ใงใฏใ€<productname>Pgpool-II</productname>ใ‚ตใƒผใƒใจ<productname>PostgreSQL</productname>ใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰ใ‚ตใƒผใƒใŒๅŒใ˜ใ‚ตใƒ–ใƒใƒƒใƒˆใƒฏใƒผใ‚ฏใซใ‚ใ‚‹ใ“ใจใ‚’ๆƒณๅฎšใ—ใ€ๅ„ใƒฆใƒผใ‚ถใŒ<acronym>scram-sha-256</acronym>่ช่จผๆ–นๅผใงๆŽฅ็ถšใ™ใ‚‹ใ‚ˆใ†ใซใ€<filename>$PGDATA/pg_hba.conf</filename>ใ‚’็ทจ้›†ใ—ใฆใŠใใพใ™ใ€‚
     </para>
     <programlisting>
+[postgres@server1 ~]$ vi $PGDATA/pg_hba.conf
+(ไปฅไธ‹ใ‚’่ฟฝๅŠ )
 host    all             pgpool          samenet                 scram-sha-256
 host    all             postgres        samenet                 scram-sha-256
-host    replication     all             samenet                 scram-sha-256
-    </programlisting>
-  </sect3>
-
-  <sect3 id="example-cluster-before-starting-ssh">
-   <title>SSHๅ…ฌ้–‹้ต่ช่จผใฎ่จญๅฎš</title>
-    <para>
-     ่‡ชๅ‹•ใƒ•ใ‚งใ‚คใƒซใ‚ชใƒผใƒใ€ใ‚ชใƒณใƒฉใ‚คใƒณใƒชใ‚ซใƒใƒชๆฉŸ่ƒฝใ‚’ๅˆฉ็”จใ™ใ‚‹ใซใฏใ€ใ™ในใฆใฎ<productname>Pgpool-II</productname>ใƒŽใƒผใƒ‰้–“ใง<literal>postgres</literal>ใƒฆใƒผใ‚ถ๏ผˆPgpool-IIใฎใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฎ่ตทๅ‹•ใƒฆใƒผใ‚ถใ€‚Pgpool-II 4.0ไปฅๅ‰ใ€ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฎ่ตทๅ‹•ใƒฆใƒผใ‚ถใฏ<literal>root</literal>๏ผ‰ใจใ—ใฆๅŒๆ–นๅ‘ใซSSHๅ…ฌ้–‹้ต่ช่จผ๏ผˆใƒ‘ใ‚นใƒฏใƒผใƒ‰ใชใ—๏ผ‰ใงๆŽฅ็ถšใงใใ‚‹ใ‚ˆใ†ใซ่จญๅฎšใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚ 
-    </para>
-    <para>
-    </para>
-    <para>
-     ใพใšใ€ๅ…จใ‚ตใƒผใƒใงไปฅไธ‹ใฎใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ—ใ€SSH้ตใƒ•ใ‚กใ‚คใƒซใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
-     ใ“ใฎ่จญๅฎšไพ‹ใงใฏ็”Ÿๆˆใ•ใ‚Œใ‚‹้ตใƒ•ใ‚กใ‚คใƒซๅใฏ<literal>id_rsa_pgpool</literal>ใจใ—ใพใ™ใ€‚
-    </para>
-    <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# su - postgres
-[ๅ…จใ‚ตใƒผใƒ]$ mkdir ~/.ssh
-[ๅ…จใ‚ตใƒผใƒ]$ chmod 700 ~/.ssh
-[ๅ…จใ‚ตใƒผใƒ]$ cd ~/.ssh
-[ๅ…จใ‚ตใƒผใƒ]$ ssh-keygen -t rsa -f id_rsa_pgpool
+host    replication     repl            samenet                 scram-sha-256
     </programlisting>
-    <para>
-     ๆฌกใซใ€ๅ…ฌ้–‹้ต<literal>id_rsa_pgpool.pub</literal>ใ‚’ๅ„ใ‚ตใƒผใƒใฎ<filename>/var/lib/pgsql/.ssh/authorized_keys</filename>ใƒ•ใ‚กใ‚คใƒซใซ่ฟฝๅŠ ใ—ใพใ™ใ€‚
-    </para>
-    <para>
-     ่จญๅฎšๅพŒใ€<literal>postgres</literal>ใƒฆใƒผใ‚ถใง<command>ssh postgres@serverX -i ~/.ssh/id_rsa_pgpool</command>ใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ—ใ€ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใชใ—ใงใƒญใ‚ฐใ‚คใƒณใงใใ‚‹ใ“ใจใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚
-    </para>
-
-    <note>
-     <para>
-      ๅ…ฌ้–‹้ต่ช่จผใซใ‚ˆใ‚‹ใƒญใ‚ฐใ‚คใƒณใซๅคฑๆ•—ใ—ใŸๅ ดๅˆใซใฏใ€ไปฅไธ‹ใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚
-      <itemizedlist>
-       <listitem>
-        <para>
-         <filename>/etc/ssh/sshd_config</filename>ใงๅ…ฌ้–‹้ต่ช่จผใŒ่จฑๅฏใ•ใ‚Œใฆใ„ใ‚‹ใ“ใจใ‚’็ขบ่ชใ—ใพใ™ใ€‚
-        </para>
-       </listitem>
-      </itemizedlist>
-      <programlisting>
-PubkeyAuthentication yes
-      </programlisting>
-      <itemizedlist>
-       <listitem>
-        <para>
-         SELinuxใ‚’ๆœ‰ๅŠนๅŒ–ใ—ใฆใ„ใ‚‹ๅ ดๅˆใฏใ€SSHๅ…ฌ้–‹้ต่ช่จผ(ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใชใ—)ใŒๅคฑๆ•—ใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚‹ใฎใงใ€ใ™ในใฆใฎใ‚ตใƒผใƒใงไปฅไธ‹ใฎใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚
-        </para>
-       </listitem>
-      </itemizedlist>
-      <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# su - postgres
-[ๅ…จใ‚ตใƒผใƒ]$ restorecon -Rv ~/.ssh
-      </programlisting>
-     </para>
-    </note>
   </sect3>
 
   <sect3 id="example-cluster-before-starting-pgpass">
@@ -500,31 +507,60 @@ PubkeyAuthentication yes
      ใƒ‘ใ‚นใƒฏใƒผใƒ‰ๅ…ฅๅŠ›ใชใ—ใงใ€ใ‚นใƒˆใƒชใƒผใƒŸใƒณใ‚ฐใƒฌใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใ‚„<application>pg_rewind</application>ใ‚’ๅฎŸ่กŒใ™ใ‚‹ใŸใ‚ใซใ€ใ™ในใฆใฎใ‚ตใƒผใƒใง<literal>postgres</literal>ใƒฆใƒผใ‚ถใฎใƒ›ใƒผใƒ ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒช<filename>/var/lib/pgsql</filename>ใซ<filename>.pgpass</filename>ใ‚’ไฝœๆˆใ—ใ€ใƒ‘ใƒผใƒŸใƒƒใ‚ทใƒงใƒณใ‚’600ใซ่จญๅฎšใ—ใฆใŠใใพใ™ใ€‚
     </para>
     <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# su - postgres
-[ๅ…จใ‚ตใƒผใƒ]$ vi /var/lib/pgsql/.pgpass
-(ไปฅไธ‹ใ‚’่ฟฝๅŠ )
+[postgres@server1 ~]$ vi ~/.pgpass
 server1:5432:replication:repl:&lt;replใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰&gt;
 server2:5432:replication:repl:&lt;replใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰&gt;
 server3:5432:replication:repl:&lt;replใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰&gt;
 server1:5432:postgres:postgres:&lt;postgresใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰&gt;
 server2:5432:postgres:postgres:&lt;postgresใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰&gt;
 server3:5432:postgres:postgres:&lt;postgresใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰&gt;
-[ๅ…จใ‚ตใƒผใƒ]$ chmod 600  /var/lib/pgsql/.pgpass
+
+[postgres@server1 ~]$ chmod 600 ~/.pgpass
+    </programlisting>
+    <para>
+     server2ใŠใ‚ˆใณserver3ใฎpostgresใƒฆใƒผใ‚ถใฎใƒ›ใƒผใƒ ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใซใ‚ณใƒ”ใƒผใ—ใพใ™ใ€‚
+    </para>
+    <programlisting>
+[postgres@server1 ~]$ scp -i ~/.ssh/id_rsa_pgpool -p ~/.pgpass postgres@server2:
+[postgres@server1 ~]$ scp -i ~/.ssh/id_rsa_pgpool -p ~/.pgpass postgres@server3:
     </programlisting>
   </sect3>
+ </sect2>
 
-  <sect3 id="example-cluster-before-starting-firewall">
-   <title>firewallใฎ่จญๅฎš</title>
+ <sect2 id="pcp-authentication">
+  <title>PCPๆŽฅ็ถš่ช่จผใฎ่จญๅฎš</title>
+  <para>
+   PCPใ‚ณใƒžใƒณใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ใซใฏใ€<literal>username:encryptedpassword</literal>ๅฝขๅผใฎPCPใƒฆใƒผใ‚ถๅใจmd5ๆš—ๅทๅŒ–ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚’<filename>pcp.conf</filename>ใซ็™ป้Œฒใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚
+  </para>
+  <para>
+   ใ“ใฎ่จญๅฎšไพ‹ใงใฏใ€PCPใƒฆใƒผใ‚ถๅใ‚’<literal>pgpool</literal>ใ€ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚’<literal>pgpool_password</literal>ใซ่จญๅฎšใ—ใพใ™ใ€‚
+   ๅฟ…่ฆใซๅฟœใ˜ใฆใ€ใƒฆใƒผใ‚ถๅใจใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚’ๅค‰ๆ›ดใ—ใฆใใ ใ•ใ„ใ€‚
+  </para>
+  <para>
+   ไปฅไธ‹ใฎใ‚ˆใ†ใซใ€pg_md5ใ‚’ไฝฟ็”จใ—ใฆใ€pcpใƒฆใƒผใ‚ถpgpoolใฎๆš—ๅทๅŒ–ใ•ใ‚ŒใŸใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚จใƒณใƒˆใƒชใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
+  </para>
+  <programlisting>
+[postgres@server1 ~]$ echo 'pgpool:'`pg_md5 pgpool_password` &gt;&gt; /etc/pgpool-II/pcp.conf
+
+[postgres@server1 ~]$ cat /etc/pgpool-II/pcp.conf
+# USERID:MD5PASSWD
+pgpool:4aa0cb9673e84b06d4c8a848c80eb5d0
+  </programlisting>
+  <para>
+   ๅพŒ่ฟฐใฎ<filename>follow_primary.sh</filename>ใฎใ‚นใ‚ฏใƒชใƒ—ใƒˆใงใƒ‘ใ‚นใƒฏใƒผใƒ‰ๅ…ฅๅŠ›ใชใ—ใง<literal>PCP</literal>ใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ใฎใงใ€<productname>Pgpool-II</productname>ใฎ่ตทๅ‹•ใƒฆใƒผใ‚ถ๏ผˆpostgresใƒฆใƒผใ‚ถ๏ผ‰ใฎใƒ›ใƒผใƒ ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใซ<filename>.pcppass</filename>ใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
+  </para>
+  <programlisting>
+[postgres@server1 ~]$ echo 'localhost:9898:pgpool:pgpool_password' &gt; ~/.pcppass
+[postgres@server1 ~]$ chmod 600 ~/.pcppass
+  </programlisting>
    <para>
-    <productname>Pgpool-II</productname>ใ‚„<productname>PostgreSQL</productname>ใซๆŽฅ็ถšใ™ใ‚‹้š›ใซใฏใ€ใƒ•ใ‚กใ‚คใ‚ขใƒผใ‚ฆใ‚ฉใƒผใƒซใซใ‚ˆใฃใฆ็›ฎ็š„ใฎใƒใƒผใƒˆใŒ้–‹ใ‘ใ‚‰ใ‚Œใฆใ„ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚
-    <systemitem>Rocky Linux 8/RHEL 8</systemitem>ใฎๅ ดๅˆใ€ไปฅไธ‹ใฎใ‚ˆใ†ใซ่จญๅฎšใ—ใพใ™ใ€‚
+    server2ใŠใ‚ˆใณserver3ใฎpostgresใƒฆใƒผใ‚ถใฎใƒ›ใƒผใƒ ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใซใ‚ณใƒ”ใƒผใ—ใพใ™ใ€‚
    </para>
    <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# firewall-cmd --permanent --zone=public --add-service=postgresql
-[ๅ…จใ‚ตใƒผใƒ]# firewall-cmd --permanent --zone=public --add-port=9999/tcp --add-port=9898/tcp --add-port=9000/tcp  --add-port=9694/udp
-[ๅ…จใ‚ตใƒผใƒ]# firewall-cmd --reload
-   </programlisting>
-  </sect3>
+[postgres@server1 ~]$ scp -i ~/.ssh/id_rsa_pgpool -p ~/.pcppass postgres@server2:
+[postgres@server1 ~]$ scp -i ~/.ssh/id_rsa_pgpool -p ~/.pcppass postgres@server3:
+[postgres@server1 ~]$ exit
+  </programlisting>
  </sect2>
 
  <sect2 id="example-cluster-pgpool-node-id">
@@ -542,7 +578,8 @@ server3:5432:postgres:postgres:&lt;postgresใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰&gt;
      <literal>server1</literal>
     </para>
     <programlisting>
-[server1]# cat /etc/pgpool-II/pgpool_node_id
+[root@server1 ~]# echo 0 &gt; /etc/pgpool-II/pgpool_node_id
+[root@server1 ~]# cat /etc/pgpool-II/pgpool_node_id
 0
     </programlisting>
    </listitem>
@@ -551,7 +588,8 @@ server3:5432:postgres:postgres:&lt;postgresใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰&gt;
      <literal>server2</literal>
     </para>
     <programlisting>
-[server2]# cat /etc/pgpool-II/pgpool_node_id
+[root@server2 ~]# echo 1 &gt; /etc/pgpool-II/pgpool_node_id
+[root@server2 ~]# cat /etc/pgpool-II/pgpool_node_id
 1
     </programlisting>
    </listitem>
@@ -560,31 +598,14 @@ server3:5432:postgres:postgres:&lt;postgresใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰&gt;
      <literal>server3</literal>
     </para>
     <programlisting>
-[server3]# cat /etc/pgpool-II/pgpool_node_id
+[root@server3 ~]# echo 2 &gt; /etc/pgpool-II/pgpool_node_id
+[root@server3 ~]# cat /etc/pgpool-II/pgpool_node_id
 2
     </programlisting>
    </listitem>
   </itemizedlist>
  </sect2>
 
- <sect2 id="pcp-authentication">
-  <title>PCPๆŽฅ็ถš่ช่จผใฎ่จญๅฎš</title>
-  <para>
-   PCPใ‚ณใƒžใƒณใƒ‰ใ‚’ไฝฟ็”จใ™ใ‚‹ใซใฏใ€<literal>username:encryptedpassword</literal>ๅฝขๅผใฎPCPใƒฆใƒผใ‚ถๅใจmd5ๆš—ๅทๅŒ–ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚’<filename>pcp.conf</filename>ใซ็™ป้Œฒใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚
-  </para>
-  <para>
-   ใ“ใฎไพ‹ใงใฏใ€PCPใƒฆใƒผใ‚ถๅใ‚’<literal>pgpool</literal>ใ€ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚’<literal>pgpool_password</literal>ใซ่จญๅฎšใ—ใพใ™ใ€‚
-   ไปฅไธ‹ใฎใ‚ˆใ†ใซใ€pg_md5ใ‚’ไฝฟ็”จใ—ใฆใ€pgpoolใƒฆใƒผใ‚ถใฎๆš—ๅทๅŒ–ใ•ใ‚ŒใŸใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚จใƒณใƒˆใƒชใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
-  </para>
-  <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# echo 'pgpool:'`pg_md5 pgpool_password` &gt;&gt; /etc/pgpool-II/pcp.conf
-
-[ๅ…จใ‚ตใƒผใƒ]# cat /etc/pgpool-II/pcp.conf
-# USERID:MD5PASSWD
-pgpool:4aa0cb9673e84b06d4c8a848c80eb5d0
-  </programlisting>
- </sect2>
-
  <sect2 id="example-cluster-pgpool-config">
   <title><productname>Pgpool-II</productname>ใฎ่จญๅฎš</title>
    <para>
@@ -600,11 +621,12 @@ pgpool:4aa0cb9673e84b06d4c8a848c80eb5d0
   <sect3 id="example-cluster-pgpool-config-config-file">
    <title>ใ‚ฏใƒฉใ‚นใ‚ฟใƒชใƒณใ‚ฐใƒขใƒผใƒ‰</title>
    <para>
-    <productname>Pgpool-II</productname>รฃ\81ยซรฃ\81ยฏรฃ\81\84รฃ\81\8fรฃ\81ยครฃ\81\8bรฃ\81ยฎรฃ\82ยฏรฃ\83ยฉรฃ\82ยนรฃ\82ยฟรฃ\83ยชรฃ\83ยณรฃ\82ยฐรฃ\83ยขรฃ\83ยผรฃ\83\89รฃ\81\8cรฃ\81\82รฃ\82\8aรฃ\81ยพรฃ\81\99รฃ\80\82
-    รฃ\82ยฏรฃ\83ยฉรฃ\82ยนรฃ\82ยฟรฃ\83ยชรฃ\83ยณรฃ\82ยฐรฃ\83ยขรฃ\83ยผรฃ\83\89รฃ\81ยฎรจยจยญรฅยฎ\9aรฃ\81ยซรฃ\81ยฏ<xref linkend="GUC-BACKEND-CLUSTERING-MODE">ใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚
-    ไปŠๅ›žใฎ่จญๅฎšไพ‹ใงใฏใ€ใ‚นใƒˆใƒชใƒผใƒŸใƒณใ‚ฐใƒฌใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใƒขใƒผใƒ‰ใ‚’่จญๅฎšใ—ใพใ™ใ€‚
+    <productname>Pgpool-II</productname>รฃ\81ยซรฃ\81ยฏรฃ\81\84รฃ\81\8fรฃ\81ยครฃ\81\8bรฃ\81ยฎรฃ\82ยฏรฃ\83ยฉรฃ\82ยนรฃ\82ยฟรฃ\83ยชรฃ\83ยณรฃ\82ยฐรฃ\83ยขรฃ\83ยผรฃ\83\89รฃ\81\8cรฃ\81\82รฃ\82\8aรฃ\80\81
+    รฃ\82ยฏรฃ\83ยฉรฃ\82ยนรฃ\82ยฟรฃ\83ยชรฃ\83ยณรฃ\82ยฐรฃ\83ยขรฃ\83ยผรฃ\83\89รฃ\82\92รจยจยญรฅยฎ\9aรฃ\81\99รฃ\82\8bรฃ\81ยซรฃ\81ยฏ<xref linkend="GUC-BACKEND-CLUSTERING-MODE">รฃ\81ยจรฃ\81\84รฃ\81\86รฃ\83\91รฃ\83ยฉรฃ\83ยกรฃ\83ยผรฃ\82ยฟใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚
+    ใ“ใฎ่จญๅฎšไพ‹ใงใฏใ€ใ‚นใƒˆใƒชใƒผใƒŸใƒณใ‚ฐใƒฌใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใƒขใƒผใƒ‰ใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚
    </para>
    <programlisting>
+[root@server1 ~]# vi /etc/pgpool-II/pgpool.conf 
 backend_clustering_mode = 'streaming_replication'
    </programlisting>
   </sect3>
@@ -678,24 +700,22 @@ health_check_max_retries = 3
     ๆœซๅฐพใซใƒŽใƒผใƒ‰IDใ‚’่กจใ™ๆ•ฐๅญ—ใ‚’ไป˜ๅŠ ใ™ใ‚‹ใ“ใจใง่ค‡ๆ•ฐใฎใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰ใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚
    </para>
    <programlisting>
-# - Backend Connection Settings -
-
 backend_hostname0 = 'server1'
 backend_port0 = 5432
 backend_weight0 = 1
-backend_data_directory0 = '/var/lib/pgsql/16/data'
+backend_data_directory0 = '/var/lib/pgsql/17/data'
 backend_flag0 = 'ALLOW_TO_FAILOVER'
 
 backend_hostname1 = 'server2'
 backend_port1 = 5432
 backend_weight1 = 1
-backend_data_directory1 = '/var/lib/pgsql/16/data'
+backend_data_directory1 = '/var/lib/pgsql/17/data'
 backend_flag1 = 'ALLOW_TO_FAILOVER'
 
 backend_hostname2 = 'server3'
 backend_port2 = 5432
 backend_weight2 = 1
-backend_data_directory2 = '/var/lib/pgsql/16/data'
+backend_data_directory2 = '/var/lib/pgsql/17/data'
 backend_flag2 = 'ALLOW_TO_FAILOVER'
    </programlisting>
 
@@ -706,11 +726,8 @@ backend_flag2 = 'ALLOW_TO_FAILOVER'
     ใ“ใ“ใงใฏใใ‚Œใžใ‚Œใฎใƒ›ใ‚นใƒˆๅใ‚’่จญๅฎšใ—ใพใ™ใ€‚
     <varname>backend_application_nameX</varname>ใซ่จญๅฎšใ•ใ‚ŒใŸๅ€คใŒใ€<varname>primary_conninfo</varname>ใฎ<varname>application_name</varname>ใซ่จญๅฎšใ•ใ‚ŒใŸๅ€คใจไธ€่‡ดใ—ใฆใ„ใ‚‹ใ“ใจใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚
       <programlisting>
-...
 backend_application_name0 = 'server1'
-...
 backend_application_name1 = 'server2'
-...
 backend_application_name2 = 'server3'
       </programlisting>
    </para>
@@ -752,27 +769,27 @@ follow_primary_command = '/etc/pgpool-II/follow_primary.sh %d %h %p %D %m %H %M
     </para>
    </note>
    <para>
-    ใ‚ตใƒณใƒ—ใƒซใ‚นใ‚ฏใƒชใƒ—ใƒˆ<ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/failover.sh.sample;hb=refs/heads/V4_5_STABLE">failover.sh</ulink>ๅŠใณ
-    <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/follow_primary.sh.sample;hb=refs/heads/V4_5_STABLE">follow_primary.sh</ulink>ใฏ
+    ใ‚ตใƒณใƒ—ใƒซใ‚นใ‚ฏใƒชใƒ—ใƒˆ<ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/failover.sh.sample;hb=refs/heads/V4_6_STABLE">failover.sh</ulink>ๅŠใณ
+    <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/follow_primary.sh.sample;hb=refs/heads/V4_6_STABLE">follow_primary.sh</ulink>ใฏ
     <filename>/etc/pgpool-II/</filename>้…ไธ‹ใซใ‚คใƒณใ‚นใƒˆใƒผใƒซใ•ใ‚Œใฆใ„ใพใ™ใฎใงใ€ใ“ใ‚Œใ‚‰ใฎใƒ•ใ‚กใ‚คใƒซใ‚’ใ‚ณใƒ”ใƒผใ—ใฆไฝœๆˆใ—ใพใ™ใ€‚
    </para>
    <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# cp -p /etc/pgpool-II/sample_scripts/failover.sh.sample /etc/pgpool-II/failover.sh
-[ๅ…จใ‚ตใƒผใƒ]# cp -p /etc/pgpool-II/sample_scripts/follow_primary.sh.sample /etc/pgpool-II/follow_primary.sh
-[ๅ…จใ‚ตใƒผใƒ]# chown postgres:postgres /etc/pgpool-II/{failover.sh,follow_primary.sh}
+[root@server1 ~]# cp -p /etc/pgpool-II/sample_scripts/failover.sh.sample /etc/pgpool-II/failover.sh
+[root@server1 ~]# cp -p /etc/pgpool-II/sample_scripts/follow_primary.sh.sample /etc/pgpool-II/follow_primary.sh
+[root@server1 ~]# chown postgres:postgres /etc/pgpool-II/{failover.sh,follow_primary.sh}
    </programlisting>
    <para>
     ๅŸบๆœฌ็š„ใซใฏ<emphasis>PGHOME</emphasis>ใ‚’็’ฐๅขƒใซๅˆใ‚ใ›ใฆๅค‰ๆ›ดใ™ใ‚Œใฐใ€ๅ‹•ไฝœใ—ใพใ™ใ€‚
    </para>
    <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# vi /etc/pgpool-II/failover.sh
+[root@server1 ~]# vi /etc/pgpool-II/failover.sh
 ...
-PGHOME=/usr/pgsql-16
+PGHOME=/usr/pgsql-17
 ...
 
-[ๅ…จใ‚ตใƒผใƒ]# vi /etc/pgpool-II/follow_primary.sh
+[root@server1 ~]# vi /etc/pgpool-II/follow_primary.sh
 ...
-PGHOME=/usr/pgsql-16
+PGHOME=/usr/pgsql-17
 ...
    </programlisting>
    <para>
@@ -780,21 +797,10 @@ PGHOME=/usr/pgsql-16
     ใ“ใฎ่จญๅฎšไพ‹ใงใฏใ€ๅ‰่ฟฐใฎ<xref linkend="PCP-AUTHENTICATION">ใ‚ปใ‚ฏใ‚ทใƒงใƒณใงใ™ใงใซ็™ป้Œฒๆธˆใฟใงใ™ใ€‚
    </para>
    <programlisting>
-# cat /etc/pgpool-II/follow_primary.sh
+[root@server1 ~]# vi /etc/pgpool-II/follow_primary.sh
 ...
 PCP_USER=pgpool
 ...
-   </programlisting>
-   <para>
-    ๅ‰่ฟฐใฎ<filename>follow_primary.sh</filename>ใฎใ‚นใ‚ฏใƒชใƒ—ใƒˆใงใƒ‘ใ‚นใƒฏใƒผใƒ‰ๅ…ฅๅŠ›ใชใ—ใง<literal>PCP</literal>ใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใงใใ‚‹ใ‚ˆใ†ใซใ€ใ™ในใฆใฎใ‚ตใƒผใƒใง<productname>Pgpool-II</productname>ใฎ่ตทๅ‹•ใƒฆใƒผใ‚ถใฎใƒ›ใƒผใƒ ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใซ<filename>.pcppass</filename>ใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
-   </para>
-   <para>
-    ใ“ใฎไพ‹ใงใฏใ€PCPใƒฆใƒผใ‚ถใŒ<literal>pgpool</literal>ใงใ€ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใŒ<literal>pgpool_password</literal>ใจใ—ใพใ™ใ€‚
-   </para>
-   <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# su - postgres
-[ๅ…จใ‚ตใƒผใƒ]$ echo 'localhost:9898:pgpool:pgpool_password' &gt; ~/.pcppass
-[ๅ…จใ‚ตใƒผใƒ]$ chmod 600 ~/.pcppass
    </programlisting>
    <note>
     <para>
@@ -821,28 +827,27 @@ recovery_password = ''
 recovery_1st_stage_command = 'recovery_1st_stage'
    </programlisting>
    <para>
-    ใ‚ชใƒณใƒฉใ‚คใƒณใƒชใ‚ซใƒใƒช็”จใฎใ‚ตใƒณใƒ—ใƒซใ‚นใ‚ฏใƒชใƒ—ใƒˆ<ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/recovery_1st_stage.sample;hb=refs/heads/V4_5_STABLE">recovery_1st_stage</ulink>
-    ๅŠใณ<ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/pgpool_remote_start.sample;hb=refs/heads/V4_5_STABLE">pgpool_remote_start</ulink>ใฏ
+    ใ‚ชใƒณใƒฉใ‚คใƒณใƒชใ‚ซใƒใƒช็”จใฎใ‚ตใƒณใƒ—ใƒซใ‚นใ‚ฏใƒชใƒ—ใƒˆ<ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/recovery_1st_stage.sample;hb=refs/heads/V4_6_STABLE">recovery_1st_stage</ulink>
+    ๅŠใณ<ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/pgpool_remote_start.sample;hb=refs/heads/V4_6_STABLE">pgpool_remote_start</ulink>ใฏ
     <filename>/etc/pgpool-II/</filename>้…ไธ‹ใซใ‚คใƒณใ‚นใƒˆใƒผใƒซใ•ใ‚Œใฆใ„ใพใ™ใฎใงใ€
     ใ“ใ‚Œใ‚‰ใฎใƒ•ใ‚กใ‚คใƒซใ‚’ใƒ—ใƒฉใ‚คใƒžใƒชใ‚ตใƒผใƒ(<literal>server1</literal>)ใฎใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใ‚ฏใƒฉใ‚นใ‚ฟ้…ไธ‹ใซ้…็ฝฎใ—ใพใ™ใ€‚
    </para>
    <programlisting>
-[server1]# cp -p /etc/pgpool-II/sample_scripts/recovery_1st_stage.sample /var/lib/pgsql/16/data/recovery_1st_stage
-[server1]# cp -p /etc/pgpool-II/sample_scripts/pgpool_remote_start.sample /var/lib/pgsql/16/data/pgpool_remote_start
-[server1]# chown postgres:postgres /var/lib/pgsql/16/data/{recovery_1st_stage,pgpool_remote_start}
+[root@server1 ~]# su - postgres -c "cp -p /etc/pgpool-II/sample_scripts/recovery_1st_stage.sample $PGDATA/recovery_1st_stage"
+[root@server1 ~]# su - postgres -c "cp -p /etc/pgpool-II/sample_scripts/pgpool_remote_start.sample $PGDATA/pgpool_remote_start"
    </programlisting>
    <para>
     ๅŸบๆœฌ็š„ใซใฏ<emphasis>PGHOME</emphasis>ใ‚’็’ฐๅขƒใซๅˆใ‚ใ›ใฆๅค‰ๆ›ดใ™ใ‚Œใฐใ€ๅ‹•ไฝœใ—ใพใ™ใ€‚
    </para>
    <programlisting>
-[server1]# vi /var/lib/pgsql/16/data/recovery_1st_stage
+[root@server1 ~]# vi /var/lib/pgsql/17/data/recovery_1st_stage
 ...
-PGHOME=/usr/pgsql-16
+PGHOME=/usr/pgsql-17
 ...
 
-[server1]# vi /var/lib/pgsql/16/data/pgpool_remote_start
+[root@server1 ~]# vi /var/lib/pgsql/17/data/pgpool_remote_start
 ...
-PGHOME=/usr/pgsql-16
+PGHOME=/usr/pgsql-17
 ...
    </programlisting>
 
@@ -852,8 +857,7 @@ PGHOME=/usr/pgsql-16
     <literal>server1</literal>ใฎtemplate1ใซ<function>pgpool_recovery</function>ใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ—ใฆใŠใใพใ™ใ€‚
    </para>
    <programlisting>
-[server1]# su - postgres
-[server1]$ psql template1 -c "CREATE EXTENSION pgpool_recovery"
+[root@server1 ~]# psql -U postgres template1 -c "CREATE EXTENSION pgpool_recovery"
    </programlisting>
    <note>
     <para>
@@ -887,6 +891,8 @@ enable_pool_hba = on
     ใ“ใฎ่จญๅฎšไพ‹ใงใฏใ€<productname>Pgpool-II</productname>ใซๆŽฅ็ถšใ—ใฆใ„ใ‚‹ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใŒๅŒใ˜ใ‚ตใƒ–ใƒใƒƒใƒˆๅ†…ใซใ‚ใ‚‹ใจๆƒณๅฎšใ—ใฆใ„ใพใ™ใ€‚
    </para>
    <programlisting>
+[root@server1 ~]# vi /etc/pgpool-II/pool_hba.conf 
+(ไปฅไธ‹ใ‚’่ฟฝๅŠ )
 host    all         pgpool           samenet          scram-sha-256
 host    all         postgres         samenet          scram-sha-256
    </programlisting>
@@ -898,26 +904,28 @@ host    all         postgres         samenet          scram-sha-256
    <para>
     <productname>Pgpool-II</productname>ใฎใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆ่ช่จผใง็”จใ„ใ‚‹ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰ใƒ•ใ‚กใ‚คใƒซๅใฏ<filename>pool_passwd</filename>ใงใ™ใ€‚
     <acronym>scram-sha-256</acronym>่ช่จผใ‚’ๅˆฉ็”จใ™ใ‚‹ๅ ดๅˆใ€<productname>Pgpool-II</productname>ใฏใใ‚Œใ‚‰ใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚’ๅพฉๅทๅŒ–ใ™ใ‚‹ใŸใ‚ใซๅพฉๅท้ตใŒๅฟ…่ฆใจใชใ‚Šใพใ™ใ€‚
-    ๅ…จใ‚ตใƒผใƒใงๅพฉๅท้ตใƒ•ใ‚กใ‚คใƒซใ‚’<productname>Pgpool-II</productname>ใฎ่ตทๅ‹•ใƒฆใƒผใ‚ถ<literal>postgres</literal> (<productname>Pgpool-II</productname> 4.0ไปฅๅ‰ใฎใƒใƒผใ‚ธใƒงใƒณใงใฏ
-    <literal>root</literal>) ใฎใƒ›ใƒผใƒ ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒช้…ไธ‹ใซไฝœๆˆใ—ใพใ™ใ€‚
+    ๅพฉๅท้ตใƒ•ใ‚กใ‚คใƒซใ‚’<productname>Pgpool-II</productname>ใฎ่ตทๅ‹•ใƒฆใƒผใ‚ถ<literal>postgres</literal>๏ผˆ<productname>Pgpool-II</productname> 4.0ไปฅๅ‰ใฎใƒใƒผใ‚ธใƒงใƒณใงใฏ<literal>root</literal>๏ผ‰ใฎใƒ›ใƒผใƒ ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒช้…ไธ‹ใซไฝœๆˆใ—ใ€<literal>server2</literal>ใŠใ‚ˆใณ<literal>server3</literal>ใซใ‚ณใƒ”ใƒผใ—ใพใ™ใ€‚
    </para>
    <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# su - postgres
-[ๅ…จใ‚ตใƒผใƒ]$ echo 'ไปปๆ„ใฎๆ–‡ๅญ—ๅˆ—' > ~/.pgpoolkey 
-[ๅ…จใ‚ตใƒผใƒ]$ chmod 600 ~/.pgpoolkey
+[root@server1 ~]# su - postgres -c "echo 'ไปปๆ„ใฎๆ–‡ๅญ—ๅˆ—' > ~/.pgpoolkey"
+[root@server1 ~]# su - postgres -c "chmod 600 ~/.pgpoolkey"
+[root@server1 ~]# su - postgres -c "scp -i ~/.ssh/id_rsa_pgpool -p ~/.pgpoolkey postgres@server2:"
+[root@server1 ~]# su - postgres -c "scp -i ~/.ssh/id_rsa_pgpool -p ~/.pgpoolkey postgres@server3:"
    </programlisting>
    <para>
     <command>pg_enc -m -k /path/to/.pgpoolkey -u username -p</command>ใ‚’ๅฎŸ่กŒใ™ใ‚‹ใจใ€ใƒฆใƒผใ‚ถๅใจ<acronym>AES256</acronym>ใงๆš—ๅทๅŒ–ใ—ใŸใƒ‘ใ‚นใƒฏใƒผใƒ‰ใฎใ‚จใƒณใƒˆใƒชใŒ<xref linkend="GUC-POOL-PASSWD">ใซ็™ป้Œฒใ•ใ‚Œใพใ™ใ€‚
     <xref linkend="GUC-POOL-PASSWD"> ใŒใพใ ๅญ˜ๅœจใ—ใชใ‘ใ‚Œใฐใ€<filename>pgpool.conf</filename>ใจๅŒใ˜ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชๅ†…ใซไฝœๆˆใ•ใ‚Œใพใ™ใ€‚
    </para>
    <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# su - postgres
-[ๅ…จใ‚ตใƒผใƒ]$ pg_enc -m -k ~/.pgpoolkey -u pgpool -p
-db password: [pgpoolใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰]
-[ๅ…จใ‚ตใƒผใƒ]$ pg_enc -m -k ~/.pgpoolkey -u postgres -p
-db password: [postgresใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰]
+[root@server1 ~]# pg_enc -m -k /var/lib/pgsql/.pgpoolkey -u pgpool -p
+db password: (pgpoolใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚’ๅ…ฅๅŠ›)
+trying to read key from file /var/lib/pgsql/.pgpoolkey
+
+[root@server1 ~]# pg_enc -m -k /var/lib/pgsql/.pgpoolkey -u postgres -p
+db password: (postgresใƒฆใƒผใ‚ถใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚’ๅ…ฅๅŠ›)
+trying to read key from file /var/lib/pgsql/.pgpoolkey
 
-# cat /etc/pgpool-II/pool_passwd 
+[root@server1 ~]# cat /etc/pgpool-II/pool_passwd 
 pgpool:AESheq2ZMZjynddMWk5sKP/Rw==
 postgres:AESHs/pWL5rtXy2IwuzroHfqg==
    </programlisting>
@@ -941,7 +949,7 @@ delegate_ip = '192.168.100.50'
 
    <para>
     ไปฎๆƒณIPใฎ่ตทๅ‹•/ๅœๆญขใ€<command>ARP</command>ใƒชใ‚ฏใ‚จใ‚นใƒˆใฎ้€ไฟกใ‚’่กŒใ†่จญๅฎšใƒ‘ใƒฉใƒกใƒผใ‚ฟ
-    <xref linkend="GUC-IF-UP-CMD">ใ€<xref linkend="GUC-IF-DOWN-CMD">ใ€<xref linkend="GUC-ARPING-CMD">ใซใ€ใƒใƒƒใƒˆใƒฏใƒผใ‚ฏ็’ฐๅขƒใซๅˆใ‚ใ›ใฆใƒใƒƒใƒˆใƒฏใƒผใ‚ฏใ‚คใƒณใ‚ฟใƒผใƒ•ใ‚งใƒผใ‚นๅใ‚’่จญๅฎšใ—ใพใ™ใ€‚
+    <xref linkend="GUC-IF-UP-CMD">รฃ\80\81<xref linkend="GUC-IF-DOWN-CMD">รฃ\80\81<xref linkend="GUC-ARPING-CMD">รฃ\81ยซรฃ\80\81รฃ\83\8dรฃ\83\83รฃ\83\88รฃ\83ยฏรฃ\83ยผรฃ\82ยฏรง\92ยฐรฅยข\83รฃ\81ยซรฅ\90\88รฃ\82\8fรฃ\81\9bรฃ\81ยฆรฃ\83\8dรฃ\83\83รฃ\83\88รฃ\83\9eรฃ\82ยนรฃ\82ยฏรฃ\81\8aรฃ\82\88รฃ\81ยณรฃ\83\8dรฃ\83\83รฃ\83\88รฃ\83ยฏรฃ\83ยผรฃ\82ยฏรฃ\82ยครฃ\83ยณรฃ\82ยฟรฃ\83ยผรฃ\83\95รฃ\82ยงรฃ\83ยผรฃ\82ยนรฅ\90\8dรฃ\82\92รจยจยญรฅยฎ\9aรฃ\81\97รฃ\81ยพรฃ\81\99รฃ\80\82
     ใ“ใฎ่จญๅฎšไพ‹ใงไฝฟ็”จใ—ใฆใ„ใ‚‹ใƒใƒƒใƒˆใƒฏใƒผใ‚ฏใ‚คใƒณใ‚ฟใƒผใƒ•ใ‚งใƒผใ‚นใฏ<literal>enp0s8</literal>ใจใชใ‚Šใพใ™ใ€‚
     <varname>if_up/down_cmd</varname>ใ‚„<varname>arping_cmd</varname>ใ‚’ๅฎŸ่กŒใ™ใ‚‹ใซใฏrootๆจฉ้™ใŒๅฟ…่ฆใจใชใ‚Šใพใ™ใฎใงใ€
     ไธ€่ˆฌใƒฆใƒผใ‚ถใงๅฎŸ่กŒใงใใ‚‹ใ‚ˆใ†ใซ<command>ip/arping</command>ใ‚ณใƒžใƒณใƒ‰ใซ<literal>setuid</literal>ใ‚’่จญๅฎšใ™ใ‚‹ใ‹ใ€<productname>Pgpool-II</productname>่ตทๅ‹•ใƒฆใƒผใ‚ถใ€ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใงใฏ<literal>postgres</literal>ใƒฆใƒผใ‚ถ (<productname>Pgpool-II</productname> 4.1ไปฅ้™) ใŒใƒ‘ใ‚นใƒฏใƒผใƒ‰ใชใ—ใซ<command>sudo</command>ใ‚’ๅฎŸ่กŒใงใใ‚‹ใ‚ˆใ†ใซ่จญๅฎšใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚
@@ -1049,23 +1057,24 @@ wd_heartbeat_deadtime = 30
 wd_escalation_command = '/etc/pgpool-II/escalation.sh'
    ใ€€</programlisting>
    <para>
-    ใ‚ตใƒณใƒ—ใƒซใ‚นใ‚ฏใƒชใƒ—ใƒˆ<ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/escalation.sh.sample;hb=refs/heads/V4_5_STABLE">escalation.sh</ulink>ใฏ
+    ใ‚ตใƒณใƒ—ใƒซใ‚นใ‚ฏใƒชใƒ—ใƒˆ<ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/escalation.sh.sample;hb=refs/heads/V4_6_STABLE">escalation.sh</ulink>ใฏ
     <filename>/etc/pgpool-II/</filename>้…ไธ‹ใซใ‚คใƒณใ‚นใƒˆใƒผใƒซใ•ใ‚Œใฆใ„ใพใ™ใ€‚
    </para>
     <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# cp -p /etc/pgpool-II/sample_scripts/escalation.sh.sample /etc/pgpool-II/escalation.sh
-[ๅ…จใ‚ตใƒผใƒ]# chown postgres:postgres /etc/pgpool-II/escalation.sh
+[root@server1 ~]# cp -p /etc/pgpool-II/sample_scripts/escalation.sh.sample /etc/pgpool-II/escalation.sh
+[root@server1 ~]# chown postgres:postgres /etc/pgpool-II/escalation.sh
     </programlisting>
 
    <para>
     ใ‚ตใƒผใƒใฎใƒ›ใ‚นใƒˆๅใ€ไปฎๆƒณIPใ€ไปฎๆƒณIPใ‚’่จญๅฎšใ™ใ‚‹ใƒใƒƒใƒˆใƒฏใƒผใ‚ฏใ‚คใƒณใ‚ฟใƒผใƒ•ใ‚งใƒผใ‚นๅใ‚’็’ฐๅขƒใซๅˆใ‚ใ›ใฆๅค‰ๆ›ดใ—ใฆใใ ใ•ใ„ใ€‚
    </para>
    <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# vi /etc/pgpool-II/escalation.sh
+[root@server1 ~]# vi /etc/pgpool-II/escalation.sh
 ...
 PGPOOLS=(server1 server2 server3)
 VIP=192.168.100.50
 DEVICE=enp0s8
+CIDR_NETMASK=24
 ...
    </programlisting>
 
@@ -1087,7 +1096,9 @@ DEVICE=enp0s8
    <title>ใƒญใ‚ฐใฎ่จญๅฎš</title>
    <para>
     <productname>Pgpool-II</productname> 4.2ไปฅ้™ใ€ใƒญใ‚ฐๅŽ้›†ใƒ—ใƒญใ‚ปใ‚นใŒ่ฟฝๅŠ ใ•ใ‚Œใพใ—ใŸใ€‚
-    ใ“ใ“ใงใฏใ€ใƒญใ‚ฐๅŽ้›†ใƒ—ใƒญใ‚ปใ‚น(<literal>logging_collector</literal>)ใ‚’ๆœ‰ๅŠนใซใ—ใพใ™ใ€‚
+    RPM ใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ‚’ไฝฟ็”จใ—ใฆใ‚คใƒณใ‚นใƒˆใƒผใƒซใ—ใŸๅ ดๅˆใ€ใƒญใ‚ฐๅŽ้›†ใƒ—ใƒญใ‚ปใ‚น(<literal>logging_collector</literal>)ใฏใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใงๆœ‰ๅŠนใซใชใฃใฆใ„ใพใ™ใ€‚
+    ใƒญใ‚ฐใƒ•ใ‚กใ‚คใƒซใฏใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใง<filename>/var/log/pgpool_log</filename>ใซๅ‡บๅŠ›ใ•ใ‚Œใพใ™ใ€‚
+    ่ฆไปถใซๅˆใ‚ใ›ใฆใ€ใƒญใ‚ฐ้–ข้€ฃใฎ่จญๅฎšใƒ‘ใƒฉใƒกใƒผใ‚ฟใ‚’้ฉๅˆ‡ใซ่ชฟๆ•ดใ—ใฆใใ ใ•ใ„ใ€‚
    </para>
    <programlisting>
 log_destination = 'stderr'
@@ -1096,23 +1107,16 @@ log_directory = '/var/log/pgpool_log'
 log_filename = 'pgpool-%a.log'
 log_truncate_on_rotation = on
 log_rotation_age = 1d
-log_rotation_size = 10MB
    </programlisting>
    <para>
-    ใ™ในใฆใฎใ‚ตใƒผใƒใงใƒญใ‚ฐใƒ•ใ‚กใ‚คใƒซใ‚’ๆ ผ็ดใ™ใ‚‹ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
-   </para>
-   <programlisting>
-[ๅ…จใ‚ตใƒผใƒ]# mkdir /var/log/pgpool_log/
-[ๅ…จใ‚ตใƒผใƒ]# chown postgres:postgres /var/log/pgpool_log/
-   </programlisting>
-
-   <para>
-    ใ“ใ‚Œใงใ€<literal>server1</literal>ใงใฎ<filename>pgpool.conf</filename>ใฎ่จญๅฎšใฏๅฎŒไบ†ใงใ™ใ€‚
-    ๆœ€ๅพŒใซใ€<literal>server1</literal>ใฎ<filename>pgpool.conf</filename>ใ‚’ไป–ใฎใ‚ตใƒผใƒ<literal>server2</literal>ใ€<literal>server3</literal>ใซใ‚ณใƒ”ใƒผใ—ใพใ™ใ€‚
+    ใ“ใ‚Œใงใ€<literal>server1</literal>ใซใŠใ‘ใ‚‹<productname>Pgpool-II</productname>ใฎ่จญๅฎšใฏๅฎŒไบ†ใงใ™ใ€‚
+    ๆœ€ๅพŒใซใ€่จญๅฎšใƒ•ใ‚กใ‚คใƒซใ‚’ไป–ใฎใ‚ตใƒผใƒ<literal>server2</literal>ใŠใ‚ˆใณ<literal>server3</literal>ใซใ‚ณใƒ”ใƒผใ—ใพใ™ใ€‚
    </para>
    <programlisting>
-[server1]# scp -p /etc/pgpool-II/pgpool.conf root@server2:/etc/pgpool-II/pgpool.conf
-[server1]# scp -p /etc/pgpool-II/pgpool.conf root@server3:/etc/pgpool-II/pgpool.conf
+[root@server1 ~]# scp -p /etc/pgpool-II/{*.conf,*.sh,pool_passwd} server2:/etc/pgpool-II/
+[root@server1 ~]# ssh server2 "chown postgres:postgres /etc/pgpool-II/{*.conf,*.sh,pool_passwd}"
+[root@server1 ~]# scp -p /etc/pgpool-II/{*.conf,*.sh,pool_passwd} server3:/etc/pgpool-II/
+[root@server1 ~]# ssh server3 "chown postgres:postgres /etc/pgpool-II/{*.conf,*.sh,pool_passwd}"
    </programlisting>
   </sect3>
  </sect2>
@@ -1137,8 +1141,7 @@ log_rotation_size = 10MB
       <productname>PostgreSQL</productname>ใƒ—ใƒฉใ‚คใƒžใƒชใ‚ตใƒผใƒใŒใพใ ่ตทๅ‹•ใ—ใฆใ„ใชใ„ๅ ดๅˆใฏใ€ใพใšๆฌกใฎใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ—ใฆ<productname>PostgreSQL</productname>่ตทๅ‹•ใ—ใพใ™ใ€‚
      </para>
      <programlisting>
-[server1]# su - postgres
-[server1]$ /usr/pgsql-16/bin/pg_ctl start -D $PGDATA
+[root@server1 ~]# su - postgres -c "/usr/pgsql-17/bin/pg_ctl start"
      </programlisting>
      <para>
       <literal>server1</literal>ใ€<literal>server2</literal>ใŠใ‚ˆใณ<literal>server3</literal>ใงไปฅไธ‹ใฎใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ—ใ€<productname>Pgpool-II</productname>ใ‚’่ตทๅ‹•ใ—ใพใ™ใ€‚
@@ -1159,7 +1162,7 @@ log_rotation_size = 10MB
       <productname>Pgpool-II</productname>ใŒ่ตทๅ‹•ใ—ใฆใ„ใ‚‹็Šถๆ…‹ใงPostgreSQLใ‚’ๅœๆญขใ™ใ‚‹ใ€ๆƒณๅฎšๅค–ใฎใƒ•ใ‚งใ‚คใƒซใ‚ชใƒผใƒใŒ่ตทใใฆใ—ใพใ†ใฎใงใ€ใ”ๆณจๆ„ใใ ใ•ใ„ใ€‚
      </para>
      <programlisting>
-# systemctl stop pgpool.service
+[ๅ…จใ‚ตใƒผใƒ]# systemctl stop pgpool.service
      </programlisting>
     </listitem>
    </itemizedlist>
@@ -1233,9 +1236,9 @@ server3:9999 Linux server3 server3 9999 9000 7 STANDBY 0 MEMBER # ใ‚นใ‚ฟใƒณใƒ
     <literal>server1</literal>ใฎ<productname>Pgpool-II</productname>ใ‚’ๅœๆญขใ™ใ‚‹ใซใฏ<productname>Pgpool-II</productname>ใ‚’ๅœๆญขใ™ใ‚‹ใ‹ใ€ใƒžใ‚ทใƒณใ‚’ใ‚ทใƒฃใƒƒใƒˆใƒ€ใ‚ฆใƒณใ—ใพใ™ใ€‚ใ“ใ“ใงใฏใ€<productname>Pgpool-II</productname>ใ‚’ๅœๆญขใ—ใพใ™ใ€‚
    </para>
    <programlisting>
-[server1]# systemctl stop pgpool.service
+[root@server1 ~]# systemctl stop pgpool.service
 
-[server1]# pcp_watchdog_info -p 9898 -h 192.168.100.50 -U pgpool -W
+[root@server1 ~]# pcp_watchdog_info -p 9898 -h 192.168.100.50 -U pgpool -W
 Password:
 3 3 YES server2:9999 Linux server2 server2
 
@@ -1247,9 +1250,9 @@ server3:9999 Linux server3 server3 9999 9000 7 STANDBY 0 MEMBER   # server3ใŒ
     ๅ…ˆใปใฉๅœๆญขใ—ใŸ<productname>Pgpool-II</productname>ใ‚’ๅ†่ตทๅ‹•ใ—ใ€ใ‚นใ‚ฟใƒณใƒใ‚คใจใ—ใฆ่ตทๅ‹•ใ—ใฆใ„ใ‚‹ใ“ใจใ‚’็ขบ่ชใ—ใพใ™ใ€‚
    </para>
    <programlisting>
-[server1]# systemctl start pgpool.service
+[root@server1 ~]# systemctl start pgpool.service
 
-[server1]# pcp_watchdog_info -p 9898 -h 192.168.100.50 -U pgpool -W
+[root@server1 ~]# pcp_watchdog_info -p 9898 -h 192.168.100.50 -U pgpool -W
 Password: 
 3 3 YES server2:9999 Linux server2 server2
 
@@ -1279,7 +1282,7 @@ Password for user pgpool:
     ใƒ•ใ‚งใ‚คใƒซใ‚ชใƒผใƒใ™ใ‚‹ใ‹ใฉใ†ใ‹็ขบ่ชใ—ใฆใฟใพใ™ใ€‚
    </para>
    <programlisting>
-[server1]$ pg_ctl -D /var/lib/pgsql/16/data -m immediate stop
+[root@server1 ~]# su - postgres -c "/usr/pgsql-17/bin/pg_ctl -m immediate stop"
    </programlisting>
    <para>
     <literal>ใƒŽใƒผใƒ‰1</literal>ใ‚’ๅœๆญขใ—ใŸๅพŒใซใ€ใƒ•ใ‚งใ‚คใƒซใ‚ชใƒผใƒใŒ็™บ็”Ÿใ—ใ€<literal>server2</literal>ใŒ
index 946cfdcdab11c73ae6eaf0e3dae7fba03a617e77..99e579a072023f003be3618657a4d1220e21cf26 100644 (file)
@@ -7,7 +7,7 @@
   servers to create a robust cluster system and avoid the single point of failure or split brain.
  </para>
  <para>
-  <productname>PostgreSQL</productname> 16 is used in this configuration example.
+  <emphasis><productname>PostgreSQL</productname> 17</emphasis> is used in this configuration example.
   All scripts have been tested with <productname>PostgreSQL</productname> 10 and later.
  </para>
  <sect2 id="example-cluster-requirement">
@@ -20,7 +20,7 @@
  <sect2 id="example-cluster-structure">
   <title>Cluster System Configuration</title>
   <para>
-   We use three servers with Rocky Linux 8 installed and
+   We use three servers with <emphasis>Rocky Linux 9</emphasis> installed and
    the hostnames of the three servers are <literal>server1</literal>
    <literal>server2</literal> and <literal>server3</literal> respectively.
    We install <productname>PostgreSQL</productname> and <productname>Pgpool-II</productname> on each server.
@@ -82,7 +82,7 @@
     <tbody>
      <row>
       <entry>PostgreSQL Version</entry>
-      <entry>16.0</entry>
+      <entry>17.0</entry>
       <entry>-</entry>
      </row>
      <row>
      </row>
      <row>
       <entry>$PGDATA</entry>
-      <entry>/var/lib/pgsql/16/data</entry>
+      <entry>/var/lib/pgsql/17/data</entry>
       <entry>-</entry>
      </row>
      <row>
       <entry>Archive mode</entry>
-      <entry>on</entry>
-      <entry>/var/lib/pgsql/archivedir</entry>
+      <entry>off</entry>
+      <entry>-</entry>
      </row>
      <row>
       <entry>Replication Slots</entry>
     <tbody>
      <row>
       <entry>Pgpool-II Version</entry>
-      <entry>4.5.0</entry>
+      <entry>4.6.0</entry>
       <entry>-</entry>
      </row>
      <row>
     <tbody>
      <row>
       <entry morerows='1'>Failover</entry>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/failover.sh.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/failover.sh.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/failover.sh.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/failover.sh.sample</ulink></entry>
       <entry>Run by <xref linkend="GUC-FAILOVER-COMMAND"> to perform failover</entry>
      </row>
      <row>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/follow_primary.sh.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/follow_primary.sh.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/follow_primary.sh.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/follow_primary.sh.sample</ulink></entry>
       <entry>Run by <xref linkend="GUC-FOLLOW-PRIMARY-COMMAND"> to synchronize the Standby with the new Primary after failover.</entry>
      </row>
      <row>
       <entry morerows='1'>Online recovery</entry>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/recovery_1st_stage.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/recovery_1st_stage.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/recovery_1st_stage.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/recovery_1st_stage.sample</ulink></entry>
       <entry>Run by <xref linkend="GUC-RECOVERY-1ST-STAGE-COMMAND"> to recovery a Standby node</entry>
      </row>
      <row>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/pgpool_remote_start.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/pgpool_remote_start.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/pgpool_remote_start.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/pgpool_remote_start.sample</ulink></entry>
       <entry>Run after <xref linkend="GUC-RECOVERY-1ST-STAGE-COMMAND"> to start the Standby node</entry>
      </row>
      <row>
       <entry morerows='1'>Watchdog</entry>
-      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/escalation.sh.sample;hb=refs/heads/V4_5_STABLE">/etc/pgpool-II/sample_scripts/escalation.sh.sample</ulink></entry>
+      <entry><ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/escalation.sh.sample;hb=refs/heads/V4_6_STABLE">/etc/pgpool-II/sample_scripts/escalation.sh.sample</ulink></entry>
       <entry>Optional Configuration. Run by <xref linkend="guc-wd-escalation-command"> to switch the Leader/Standby Pgpool-II safely</entry>
      </row>
     </tbody>
    Install <productname>PostgreSQL</productname> from <productname>PostgreSQL</productname> YUM repository.
   </para>
   <programlisting>
-[all servers]# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
+[all servers]# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
 [all servers]# dnf -qy module disable postgresql
-[all servers]# dnf install -y postgresql16-server
+[all servers]# dnf install -y postgresql17-server
   </programlisting>
   <para>
    Since <productname>Pgpool-II</productname> related packages are also included in <productname>PostgreSQL</productname> YUM repository,
 ...
 exclude=pgpool*
 
+[pgdg17]
+...
+exclude=pgpool*
+
 [pgdg16]
 ...
 exclude=pgpool*
@@ -267,19 +271,21 @@ exclude=pgpool*
 
 [pgdg12]
 ...
-exclude=pgpool*
-
-[pgdg11]
-...
 exclude=pgpool*
   </programlisting>
 
   <para>
-   Install <productname>Pgpool-II</productname> from Pgpool-II YUM repository.
+   Install <productname>Pgpool-II</productname> from
+   <productname>Pgpool-II</productname> YUM repository.
+   To install the required libmemcached library for Pgpool-II,
+   you need to enable <literal>crb</literal> repository.
+   If you're using <literal>Rocky Linux 8</literal>,
+   use <literal>powertools</literal> repository instead of
+   <literal>crb</literal> repository.
   </para>
   <programlisting>
-[all servers]# dnf install -y https://www.pgpool.net/yum/rpms/4.5/redhat/rhel-8-x86_64/pgpool-II-release-4.5-1.noarch.rpm
-[all servers]# dnf install -y pgpool-II-pg16-*
+[all servers]# dnf install -y https://www.pgpool.net/yum/rpms/4.6/redhat/rhel-9-x86_64/pgpool-II-release-4.6-1.noarch.rpm
+[all servers]# dnf install -y --enablerepo=crb pgpool-II-pg17-*
   </programlisting>
  </sect2>
 
@@ -289,63 +295,129 @@ exclude=pgpool*
    Before you start the configuration process, please check the following prerequisites.
   </para>
 
-  <sect3 id="example-cluster-before-starting-primary">
-   <title>Setting up streaming replication on Primary</title>
+  <sect3 id="example-cluster-before-starting-ssh">
+   <title>Setting up SSH public key authentication</title>
    <para>
-    Set up <productname>PostgreSQL</productname> streaming replication on the primary server.
-    In this example, we use WAL archiving.
+    To use the automated failover and online recovery of <productname>Pgpool-II</productname>, 
+    it is required to configure <emphasis>SSH public key authentication
+    (passwordless SSH login)</emphasis> to all backend servers using
+    <literal>postgres</literal> user (the default user Pgpool-II is running as.
+    Pgpool-II 4.0 or before, the default user is <literal>root</literal>).
    </para>
    <para>
-    First, we create the directory <filename>/var/lib/pgsql/archivedir</filename> to store
-    <acronym>WAL</acronym> segments on all servers. In this example, only Primary node archives
-    <acronym>WAL</acronym> locally.
+    Execute the following command on all servers to generate a key pair using
+    the RSA algorithm. In this example, we assume that the generated key file
+    name is <literal>id_rsa_pgpool</literal>.
    </para>
    <programlisting>
 [all servers]# su - postgres
-[all servers]$ mkdir /var/lib/pgsql/archivedir
+[all servers]$ mkdir ~/.ssh && chmod 700 ~/.ssh
+[all servers]$ ssh-keygen -t rsa -f ~/.ssh/id_rsa_pgpool
    </programlisting>
+   <para>
+    Then add the public key <filename>id_rsa_pgpool.pub</filename> to
+    <filename>/var/lib/pgsql/.ssh/authorized_keys</filename> file
+    on each server.
+   </para>
+   <para>
+    After setting SSH, make sure that you can run
+    <command>ssh postgres@serverX -i ~/.ssh/id_rsa_pgpool</command> command
+    as <literal>postgres</literal> user to login to each server
+    without entering a password. 
+   </para>
 
+   <note>
+    <para>
+     If you failed to login using SSH public key authentication, please check the following:
+     <itemizedlist>
+      <listitem>
+       <para>
+        Ensure the public key authentication option <literal>PubkeyAuthentication</literal> are allowed in <filename>/etc/ssh/sshd_config</filename>:
+       </para>
+      </listitem>
+     </itemizedlist>
+     <programlisting>
+PubkeyAuthentication yes
+     </programlisting>
+     <itemizedlist>
+      <listitem>
+       <para>
+        If SELinux is enabled, SSH public key authentication (passwordless SSH) may fail.
+        You need to run the following command on all servers.
+       </para>
+      </listitem>
+     </itemizedlist>
+    <programlisting>
+[all servers]# su - postgres
+[all servers]$ restorecon -Rv ~/.ssh
+    </programlisting>
+    </para>
+   </note>
+  </sect3>
+
+  <sect3 id="example-cluster-before-starting-firewall">
+   <title>Setting up firewall</title>
    <para>
-    Initialize <productname>PostgreSQL</productname> on the primary server.
+    When connect to <productname>Pgpool-II</productname> and <productname>PostgreSQL</productname> servers, the target port must be accessible by enabling firewall management softwares. Following is an example for <systemitem>Rocky Linux 8/RHEL 8</systemitem>.
    </para>
    <programlisting>
-[server1]# su - postgres
-[server1]$ /usr/pgsql-16/bin/initdb -D $PGDATA
+[all servers]# firewall-cmd --permanent --zone=public --add-service=postgresql
+[all servers]# firewall-cmd --permanent --zone=public --add-port=9999/tcp --add-port=9898/tcp --add-port=9000/tcp  --add-port=9694/udp
+[all servers]# firewall-cmd --reload
+   </programlisting>
+  </sect3>
+
+  <sect3 id="example-cluster-before-starting-primary">
+   <title>Setting up PostgreSQL primary</title>
+   <para>
+    Set up the PostgreSQL primary server on <literal>server1</literal>.
+   </para>
+
+   <para>
+    First, initialize the database cluster. 
+    In <productname>PostgreSQL</productname> 17, the default directory
+    for creating the database cluster is <filename>/var/lib/pgsql/17/data</filename>,
+    and this is specified in the environment variable <varname>PGDATA</varname>
+    in the <filename>~/.bash_profile</filename> of the <literal>postgres</literal>
+    user. Modify it if you want to change the default path.
+   </para>
+   <para>
+    Run <command>initdb</command> to initialize the database cluster.
+    Specify <ulink url="https://www.postgresql.org/docs/17/app-initdb.html">options</ulink>
+    such as <literal>--encoding</literal> and <literal>--locale</literal>
+    if you need to configure the database encoding and locale settings.
+   </para>
+   <programlisting>
+[root@server1 ~]# su - postgres
+[postgres@server1 ~]$ /usr/pgsql-17/bin/initdb
     </programlisting>
 
     <para>
-     Then we edit the configuration file <filename>$PGDATA/postgresql.conf</filename>
-     on <literal>server1</literal> (primary) as follows. Enable <literal>wal_log_hints</literal>
+     Then edit the configuration file <filename>$PGDATA/postgresql.conf</filename>
+     on <literal>server1</literal> as follows. Enable <literal>wal_log_hints</literal>
      to use <literal>pg_rewind</literal>. 
-     Since the Primary may become a Standby later, we set <varname>hot_standby = on</varname>.
     </para>
     <programlisting>
+[postgres@server1 ~]$ vi $PGDATA/postgresql.conf
 listen_addresses = '*'
-archive_mode = on
-archive_command = 'cp "%p" "/var/lib/pgsql/archivedir/%f"'
-max_wal_senders = 10
-max_replication_slots = 10
-wal_level = replica
-hot_standby = on
 wal_log_hints = on
     </programlisting>
     <para>
-     Start PostgreSQL primary server on <literal>server1</literal>.
+     Start <productname>PostgreSQL</productname> on <literal>server1</literal>.
     </para>
    <programlisting>
-[server1]# su - postgres
-[server1]$ /usr/pgsql-16/bin/pg_ctl start -D $PGDATA
+[postgres@server1 ~]$ /usr/pgsql-17/bin/pg_ctl start
     </programlisting>
   </sect3>
 
   <sect3 id="example-cluster-before-starting-standby">
-   <title>Setting up streaming replication on Standby</title>
+   <title>Setting up PostgreSQL standby</title>
    <para>
     There are multiple methods to setup a standby server, such as:
     <itemizedlist>
      <listitem>
       <para>
-       use pg_basebackup to backup the data directory of the primary from the standby.
+       use <command>pg_basebackup</command> to backup the data directory of the primary from the standby.
       </para>
      </listitem>
      <listitem>
@@ -418,7 +490,7 @@ wal_log_hints = on
     </table>
 
     <programlisting>
-[server1]# psql -U postgres -p 5432
+[postgres@server1 ~]$ psql
 postgres=# SET password_encryption = 'scram-sha-256';
 postgres=# CREATE ROLE pgpool WITH LOGIN;
 postgres=# CREATE ROLE repl WITH REPLICATION LOGIN;
@@ -437,7 +509,8 @@ postgres=# \password postgres
      to <literal>pgpool</literal>:
     </para>
     <programlisting>
-GRANT pg_monitor TO pgpool;
+postgres=# GRANT pg_monitor TO pgpool;
+postgres=# \q
     </programlisting>
     <note>
      <para>
@@ -447,79 +520,19 @@ GRANT pg_monitor TO pgpool;
      </para>
     </note>
     <para>
-     Assuming that all the <productname>Pgpool-II</productname> servers and the 
+     In this example, assuming that all the <productname>Pgpool-II</productname> servers and the 
      <productname>PostgreSQL</productname> servers are in the same subnet and edit <filename>pg_hba.conf</filename> to 
      enable <literal>scram-sha-256</literal> authentication method.
     </para>
     <programlisting>
+[postgres@server1 ~]$ vi $PGDATA/pg_hba.conf
+(Add the following entries)
 host    all             pgpool             samenet                 scram-sha-256
 host    all             postgres           samenet                 scram-sha-256
 host    replication     repl               samenet                 scram-sha-256
     </programlisting>
   </sect3>
 
-  <sect3 id="example-cluster-before-starting-ssh">
-   <title>Setting up SSH public key authentication</title>
-   <para>
-    To use the automated failover and online recovery of <productname>Pgpool-II</productname>, 
-    it is required to configure <emphasis>SSH public key authentication
-    (passwordless SSH login)</emphasis> to all backend servers using
-    <literal>postgres</literal> user (the default user Pgpool-II is running as.
-    Pgpool-II 4.0 or before, the default user is <literal>root</literal>).
-   </para>
-   <para>
-    Execute the following command on all servers to generate a key pair using
-    the RSA algorithm. In this example, we assume that the generated key file
-    name is <literal>id_rsa_pgpool</literal>.
-   </para>
-   <programlisting>
-[all servers]# su - postgres
-[all servers]$ mkdir ~/.ssh
-[all servers]$ chmod 700 ~/.ssh
-[all servers]$ cd ~/.ssh
-[all servers]$ ssh-keygen -t rsa -f id_rsa_pgpool
-   </programlisting>
-   <para>
-    Then add the public key <filename>id_rsa_pgpool.pub</filename> to
-    <filename>/var/lib/pgsql/.ssh/authorized_keys</filename> file
-    on each server.
-   </para>
-   <para>
-    After setting SSH, make sure that you can run
-    <command>ssh postgres@serverX -i ~/.ssh/id_rsa_pgpool</command> command
-    as <literal>postgres</literal> user to login to each server
-    without entering a password. 
-   </para>
-
-   <note>
-    <para>
-     If you failed to login using SSH public key authentication, please check the following:
-     <itemizedlist>
-      <listitem>
-       <para>
-        Ensure the public key authentication option <literal>PubkeyAuthentication</literal> are allowed in <filename>/etc/ssh/sshd_config</filename>:
-       </para>
-      </listitem>
-     </itemizedlist>
-     <programlisting>
-PubkeyAuthentication yes
-     </programlisting>
-     <itemizedlist>
-      <listitem>
-       <para>
-        If SELinux is enabled, SSH public key authentication (passwordless SSH) may fail.
-        You need to run the following command on all servers.
-       </para>
-      </listitem>
-     </itemizedlist>
-    <programlisting>
-[all servers]# su - postgres
-[all servers]$ restorecon -Rv ~/.ssh
-    </programlisting>
-    </para>
-   </note>
-  </sect3>
-
   <sect3 id="example-cluster-before-starting-pgpass">
    <title>Creating .pgpass</title>
    <para>
@@ -533,31 +546,74 @@ PubkeyAuthentication yes
     user without providing a password for streaming replication and failover.
    </para>
    <programlisting>
-[all servers]# su - postgres
-[all servers]$ vi /var/lib/pgsql/.pgpass
+[postgres@server1 ~]$ vi ~/.pgpass
 server1:5432:replication:repl:&lt;repl user password&gt;
 server2:5432:replication:repl:&lt;repl user password&gt;
 server3:5432:replication:repl:&lt;repl user password&gt;
 server1:5432:postgres:postgres:&lt;postgres user password&gt;
 server2:5432:postgres:postgres:&lt;postgres user password&gt;
 server3:5432:postgres:postgres:&lt;postgres user password&gt;
-[all servers]$ chmod 600 /var/lib/pgsql/.pgpass
-   </programlisting>
-  </sect3>
 
-  <sect3 id="example-cluster-before-starting-firewall">
-   <title>Setting up firewall</title>
+[postgres@server1 ~]$ chmod 600 ~/.pgpass
+   </programlisting>
    <para>
-    When connect to <productname>Pgpool-II</productname> and <productname>PostgreSQL</productname> servers, the target port must be accessible by enabling firewall management softwares. Following is an example for <systemitem>Rocky Linux 8/RHEL 8</systemitem>.
+    Copy it to the home directory of <literal>postgres</literal> user
+    on <literal>server2</literal> and <literal>server3</literal>.
    </para>
    <programlisting>
-[all servers]# firewall-cmd --permanent --zone=public --add-service=postgresql
-[all servers]# firewall-cmd --permanent --zone=public --add-port=9999/tcp --add-port=9898/tcp --add-port=9000/tcp  --add-port=9694/udp
-[all servers]# firewall-cmd --reload
+[postgres@server1 ~]$ scp -i ~/.ssh/id_rsa_pgpool -p ~/.pgpass postgres@server2:
+[postgres@server1 ~]$ scp -i ~/.ssh/id_rsa_pgpool -p ~/.pgpass postgres@server3:
    </programlisting>
   </sect3>
  </sect2>
 
+ <sect2 id="pcp-authentication">
+  <title>PCP connection authentication</title>
+  <para>
+   To use PCP commands PCP user names and md5 encrypted passwords must be
+   declared in <filename>pcp.conf</filename> in format
+   "<literal>username:encrypted password</literal>".
+  </para>
+  <para>
+   In this example, we set PCP username to "<literal>pgpool</literal>"
+   and password to "<literal>pgpool_password</literal>".
+   Use <xref linkend="PG-MD5"> to create the encrypted password entry for
+   <literal>pgpool</literal> user as below:
+  </para>
+  <programlisting>
+[postgres@server1 ~]$ echo 'pgpool:'`pg_md5 pgpool_password` &gt;&gt; /etc/pgpool-II/pcp.conf
+
+[postgres@server1 ~]$ cat /etc/pgpool-II/pcp.conf
+# USERID:MD5PASSWD
+pgpool:4aa0cb9673e84b06d4c8a848c80eb5d0
+  </programlisting>
+  <para>
+   Since <filename>follow_primary.sh</filename> script mentioned
+   later must execute PCP command without entering a password,
+   create <filename>.pcppass</filename> in
+   <literal>postgres</literal> user's home directory
+   (the home directory of the user Pgpool-II is running as).
+   The format of <filename>.pcppass</filename> is
+   "<literal>hostname:port:username:password</literal>".
+  </para>
+  <para>
+   In this example, we assume that the PCP user is <literal>pgpool</literal>
+   and the password is <literal>pgpool_password</literal>.
+  </para>
+  <programlisting>
+[postgres@server1 ~]$ echo 'localhost:9898:pgpool:pgpool_password' &gt; ~/.pcppass
+[postgres@server1 ~]$ chmod 600 ~/.pcppass
+  </programlisting>
+  <para>
+   Copy to <literal>server2</literal> and <literal>server3</literal>.
+  </para>
+  <programlisting>
+[postgres@server1 ~]$ scp -i ~/.ssh/id_rsa_pgpool -p ~/.pcppass postgres@server2:
+[postgres@server1 ~]$ scp -i ~/.ssh/id_rsa_pgpool -p ~/.pcppass postgres@server3:
+[postgres@server1 ~]$ exit
+  </programlisting>
+ </sect2>
+
  <sect2 id="example-cluster-pgpool-node-id">
   <title>Create pgpool_node_id</title>
   <para>
@@ -573,7 +629,8 @@ server3:5432:postgres:postgres:&lt;postgres user password&gt;
      <literal>server1</literal>
     </para>
     <programlisting>
-[server1]# cat /etc/pgpool-II/pgpool_node_id
+[root@server1 ~]# echo 0 &gt; /etc/pgpool-II/pgpool_node_id
+[root@server1 ~]# cat /etc/pgpool-II/pgpool_node_id
 0
     </programlisting>
    </listitem>
@@ -582,7 +639,8 @@ server3:5432:postgres:postgres:&lt;postgres user password&gt;
      <literal>server2</literal>
     </para>
     <programlisting>
-[server2]# cat /etc/pgpool-II/pgpool_node_id
+[root@server2 ~]# echo 1 &gt; /etc/pgpool-II/pgpool_node_id
+[root@server2 ~]# cat /etc/pgpool-II/pgpool_node_id
 1
     </programlisting>
    </listitem>
@@ -591,35 +649,14 @@ server3:5432:postgres:postgres:&lt;postgres user password&gt;
      <literal>server3</literal>
     </para>
     <programlisting>
-[server3]# cat /etc/pgpool-II/pgpool_node_id
+[root@server3 ~]# echo 2 &gt; /etc/pgpool-II/pgpool_node_id
+[root@server3 ~]# cat /etc/pgpool-II/pgpool_node_id
 2
     </programlisting>
    </listitem>
   </itemizedlist>
  </sect2>
 
- <sect2 id="pcp-authentication">
-  <title>PCP connection authentication</title>
-  <para>
-   To use PCP commands PCP user names and md5 encrypted passwords must be
-   declared in <filename>pcp.conf</filename> in format
-   "<literal>username:encrypted password</literal>".
-  </para>
-  <para>
-   In this example, we set PCP username to "<literal>pgpool</literal>"
-   and password to "<literal>pgpool_password</literal>".
-   Use <xref linkend="PG-MD5"> to create the encrypted password entry for
-   <literal>pgpool</literal> user as below:
-  </para>
-  <programlisting>
-[all servers]# echo 'pgpool:'`pg_md5 pgpool_password` &gt;&gt; /etc/pgpool-II/pcp.conf
-
-[all servers]# cat /etc/pgpool-II/pcp.conf
-# USERID:MD5PASSWD
-pgpool:4aa0cb9673e84b06d4c8a848c80eb5d0
-  </programlisting>
- </sect2>
-
  <sect2 id="example-cluster-pgpool-config">
   <title><productname>Pgpool-II</productname> Configuration</title>
   <para>
@@ -641,6 +678,7 @@ pgpool:4aa0cb9673e84b06d4c8a848c80eb5d0
     example, streaming replication mode is used.
    </para>
    <programlisting>
+[root@server1 ~]# vi /etc/pgpool-II/pgpool.conf 
 backend_clustering_mode = 'streaming_replication'
    </programlisting>
   </sect3>
@@ -710,24 +748,22 @@ health_check_max_retries = 3
     Multiple backends can be specified by adding a number at the end of the parameter name.
    </para>
    <programlisting>
-# - Backend Connection Settings -
-
 backend_hostname0 = 'server1'
 backend_port0 = 5432
 backend_weight0 = 1
-backend_data_directory0 = '/var/lib/pgsql/16/data'
+backend_data_directory0 = '/var/lib/pgsql/17/data'
 backend_flag0 = 'ALLOW_TO_FAILOVER'
 
 backend_hostname1 = 'server2'
 backend_port1 = 5432
 backend_weight1 = 1
-backend_data_directory1 = '/var/lib/pgsql/16/data'
+backend_data_directory1 = '/var/lib/pgsql/17/data'
 backend_flag1 = 'ALLOW_TO_FAILOVER'
 
 backend_hostname2 = 'server3'
 backend_port2 = 5432
 backend_weight2 = 1
-backend_data_directory2 = '/var/lib/pgsql/16/data'
+backend_data_directory2 = '/var/lib/pgsql/17/data'
 backend_flag2 = 'ALLOW_TO_FAILOVER'
    </programlisting>
    <para>
@@ -742,11 +778,8 @@ backend_flag2 = 'ALLOW_TO_FAILOVER'
     of <varname>primary_conninfo</varname>.
    </para>
    <programlisting>
-...
 backend_application_name0 = 'server1'
-...
 backend_application_name1 = 'server2'
-...
 backend_application_name2 = 'server3'
    </programlisting>
   </sect3>
@@ -786,28 +819,28 @@ follow_primary_command = '/etc/pgpool-II/follow_primary.sh %d %h %p %D %m %H %M
     </para>
    </note>
    <para>
-    Sample scripts <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/failover.sh.sample;hb=refs/heads/V4_5_STABLE">failover.sh</ulink>
-    and <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/follow_primary.sh.sample;hb=refs/heads/V4_5_STABLE">follow_primary.sh</ulink>
+    Sample scripts <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/failover.sh.sample;hb=refs/heads/V4_6_STABLE">failover.sh</ulink>
+    and <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/follow_primary.sh.sample;hb=refs/heads/V4_6_STABLE">follow_primary.sh</ulink>
     are installed in <filename>/etc/pgpool-II/</filename>. Create failover scripts using these sample files.
    </para>
    <programlisting>
-[all servers]# cp -p /etc/pgpool-II/sample_scripts/failover.sh.sample /etc/pgpool-II/failover.sh
-[all servers]# cp -p /etc/pgpool-II/sample_scripts/follow_primary.sh.sample /etc/pgpool-II/follow_primary.sh
-[all servers]# chown postgres:postgres /etc/pgpool-II/{failover.sh,follow_primary.sh}
+[root@server1 ~]# cp -p /etc/pgpool-II/sample_scripts/failover.sh.sample /etc/pgpool-II/failover.sh
+[root@server1 ~]# cp -p /etc/pgpool-II/sample_scripts/follow_primary.sh.sample /etc/pgpool-II/follow_primary.sh
+[root@server1 ~]# chown postgres:postgres /etc/pgpool-II/{failover.sh,follow_primary.sh}
    </programlisting>
    <para>
     Basically, it should work if you change <emphasis>PGHOME</emphasis> according to
     PostgreSQL installation directory.
    </para>
    <programlisting>
-[all servers]# vi /etc/pgpool-II/failover.sh
+[root@server1 ~]# vi /etc/pgpool-II/failover.sh
 ...
-PGHOME=/usr/pgsql-16
+PGHOME=/usr/pgsql-17
 ...
 
-[all servers]# vi /etc/pgpool-II/follow_primary.sh
+[root@server1 ~]# vi /etc/pgpool-II/follow_primary.sh
 ...
-PGHOME=/usr/pgsql-16
+PGHOME=/usr/pgsql-17
 ...
    </programlisting>
 
@@ -817,27 +850,10 @@ PGHOME=/usr/pgsql-16
     In this example, we have created in <xref linkend="PCP-AUTHENTICATION">
    </para>
    <programlisting>
-# cat /etc/pgpool-II/follow_primary.sh
+[root@server1 ~]# cat /etc/pgpool-II/follow_primary.sh
 ...
 PCP_USER=pgpool
 ...
-   </programlisting>
-   <para>
-    Since <filename>follow_primary.sh</filename> script must execute PCP command without
-    entering a password, we need to create <filename>.pcppass</filename> in
-    <literal>postgres</literal> user's home directory on each server
-    (the home directory of the user Pgpool-II is running as).
-    The format of <filename>.pcppass</filename> is
-    "<literal>hostname:port:username:password</literal>".
-   </para>
-   <para>
-    In this example, we assume that the PCP user is <literal>pgpool</literal>
-    and the password is <literal>pgpool_password</literal>.
-   </para>
-   <programlisting>
-[all servers]# su - postgres
-[all servers]$ echo 'localhost:9898:pgpool:pgpool_password' &gt; ~/.pcppass
-[all servers]$ chmod 600 ~/.pcppass
    </programlisting>
    <note>
     <para>
@@ -869,27 +885,26 @@ recovery_1st_stage_command = 'recovery_1st_stage'
     primary server (server1).
    </para>
    <para>
-    The sample scripts of online recovery <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/recovery_1st_stage.sample;hb=refs/heads/V4_5_STABLE">recovery_1st_stage</ulink>
-    and <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/pgpool_remote_start.sample;hb=refs/heads/V4_5_STABLE">pgpool_remote_start</ulink>
+    The sample scripts of online recovery <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/recovery_1st_stage.sample;hb=refs/heads/V4_6_STABLE">recovery_1st_stage</ulink>
+    and <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/pgpool_remote_start.sample;hb=refs/heads/V4_6_STABLE">pgpool_remote_start</ulink>
     are installed in <filename>/etc/pgpool-II/</filename>. Copy these files to the data directory of the primary server (server1).
    </para>
    <programlisting>
-[server1]# cp -p /etc/pgpool-II/sample_scripts/recovery_1st_stage.sample /var/lib/pgsql/16/data/recovery_1st_stage
-[server1]# cp -p /etc/pgpool-II/sample_scripts/pgpool_remote_start.sample /var/lib/pgsql/16/data/pgpool_remote_start
-[server1]# chown postgres:postgres /var/lib/pgsql/16/data/{recovery_1st_stage,pgpool_remote_start}
+[root@server1 ~]# su - postgres -c "cp -p /etc/pgpool-II/sample_scripts/recovery_1st_stage.sample $PGDATA/recovery_1st_stage"
+[root@server1 ~]# su - postgres -c "cp -p /etc/pgpool-II/sample_scripts/pgpool_remote_start.sample $PGDATA/pgpool_remote_start"
    </programlisting>
    <para>
     Basically, it should work if you change <emphasis>PGHOME</emphasis> according to PostgreSQL installation directory.
    </para>
    <programlisting>
-[server1]# vi /var/lib/pgsql/16/data/recovery_1st_stage
+[root@server1 ~]# vi /var/lib/pgsql/17/data/recovery_1st_stage
 ...
-PGHOME=/usr/pgsql-16
+PGHOME=/usr/pgsql-17
 ...
 
-[server1]# vi /var/lib/pgsql/16/data/pgpool_remote_start
+[root@server1 ~]# vi /var/lib/pgsql/17/data/pgpool_remote_start
 ...
-PGHOME=/usr/pgsql-16
+PGHOME=/usr/pgsql-17
 ...
    </programlisting>
 
@@ -901,8 +916,7 @@ PGHOME=/usr/pgsql-16
     <literal>server1</literal>.
    </para>
    <programlisting>
-[server1]# su - postgres
-[server1]$ psql template1 -c "CREATE EXTENSION pgpool_recovery"
+[root@server1 ~]# psql -U postgres template1 -c "CREATE EXTENSION pgpool_recovery"
    </programlisting>
    <note>
     <para>
@@ -936,6 +950,8 @@ enable_pool_hba = on
     is in the same subnet.
    </para>
    <programlisting>
+[root@server1 ~]# vi /etc/pgpool-II/pool_hba.conf
+(Add the following entries)
 host    all         pgpool           samenet          scram-sha-256
 host    all         postgres         samenet          scram-sha-256
    </programlisting>
@@ -954,9 +970,10 @@ host    all         postgres         samenet          scram-sha-256
      (the user Pgpool-II is running as. <productname>Pgpool-II</productname> 4.0 or before,
      <productname>Pgpool-II</productname> is running as <literal>root</literal> by default)
      <programlisting>
-[all servers]# su - postgres
-[all servers]$ echo 'some string' > ~/.pgpoolkey
-[all servers]$ chmod 600 ~/.pgpoolkey
+[root@server1 ~]# su - postgres -c "echo 'some string' > ~/.pgpoolkey"
+[root@server1 ~]# su - postgres -c "chmod 600 ~/.pgpoolkey"
+[root@server1 ~]# su - postgres -c "scp -i ~/.ssh/id_rsa_pgpool -p ~/.pgpoolkey postgres@server2:"
+[root@server1 ~]# su - postgres -c "scp -i ~/.ssh/id_rsa_pgpool -p ~/.pgpoolkey postgres@server3:"
      </programlisting>
    </para>
    <para>
@@ -966,13 +983,15 @@ host    all         postgres         samenet          scram-sha-256
     <filename>pgpool.conf</filename>.
    </para>
    <programlisting>
-[all servers]# su - postgres
-[all servers]$ pg_enc -m -k ~/.pgpoolkey -u pgpool -p
-db password: [pgpool user's password]
-[all servers]$ pg_enc -m -k ~/.pgpoolkey -u postgres -p
-db password: [postgres user's password]
+[root@server1 ~]# pg_enc -m -k /var/lib/pgsql/.pgpoolkey -u pgpool -p
+db password: (Enter the password for pgpool user)
+trying to read key from file /var/lib/pgsql/.pgpoolkey
 
-# cat /etc/pgpool-II/pool_passwd
+[root@server1 ~]# pg_enc -m -k /var/lib/pgsql/.pgpoolkey -u postgres -p
+db password: (Enter the password for postgres user)
+trying to read key from file /var/lib/pgsql/.pgpoolkey
+
+[root@server1 ~]# cat /etc/pgpool-II/pool_passwd 
 pgpool:AESheq2ZMZjynddMWk5sKP/Rw==
 postgres:AESHs/pWL5rtXy2IwuzroHfqg==
    </programlisting>
@@ -995,8 +1014,10 @@ delegate_ip = '192.168.100.50'
    </programlisting>
 
    <para>
-    To bring up/down the virtual IP and send the ARP requests, we set <xref linkend="GUC-IF-UP-CMD">, <xref linkend="GUC-IF-DOWN-CMD"> and <xref linkend="GUC-ARPING-CMD">.
-    The network interface used in this example is "enp0s8".
+    To bring up/down the virtual IP and send the ARP requests,
+    we set <xref linkend="GUC-IF-UP-CMD">, <xref linkend="GUC-IF-DOWN-CMD"> and <xref linkend="GUC-ARPING-CMD">.  
+    Set the netmask and network interface name according to your network environment.
+    The network interface used in this example is <literal>enp0s8</literal>.
     Since root privilege is required to execute <varname>if_up/down_cmd</varname> or
     <varname>arping_cmd</varname> command, use setuid on these command or allow
     <literal>postgres</literal> user (the user Pgpool-II is running as) to run
@@ -1099,11 +1120,11 @@ wd_heartbeat_deadtime = 30
 wd_escalation_command = '/etc/pgpool-II/escalation.sh'
     </programlisting>
    <para>
-    The sample script <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/escalation.sh.sample;hb=refs/heads/V4_5_STABLE">escalation.sh</ulink> is installed in <filename>/etc/pgpool-II/</filename>.
+    The sample script <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/escalation.sh.sample;hb=refs/heads/V4_6_STABLE">escalation.sh</ulink> is installed in <filename>/etc/pgpool-II/</filename>.
    </para>
     <programlisting>
-[all servers]# cp -p /etc/pgpool-II/sample_scripts/escalation.sh.sample /etc/pgpool-II/escalation.sh
-[all servers]# chown postgres:postgres /etc/pgpool-II/escalation.sh
+[root@server1 ~]# cp -p /etc/pgpool-II/sample_scripts/escalation.sh.sample /etc/pgpool-II/escalation.sh
+[root@server1 ~]# chown postgres:postgres /etc/pgpool-II/escalation.sh
     </programlisting>
 
    <para>
@@ -1113,11 +1134,12 @@ wd_escalation_command = '/etc/pgpool-II/escalation.sh'
     DEVICE is the network interface for the virtual IP.
    </para>
     <programlisting>
-[all servers]# vi /etc/pgpool-II/escalation.sh
+[root@server1 ~]# vi /etc/pgpool-II/escalation.sh
 ...
 PGPOOLS=(server1 server2 server3)
 VIP=192.168.100.50
 DEVICE=enp0s8
+CIDR_NETMASK=24
 ...
     </programlisting>
 
@@ -1138,8 +1160,14 @@ DEVICE=enp0s8
   <sect3 id="example-cluster-pgpool-config-log">
    <title>Logging</title>
    <para>
-    Since Pgpool-II 4.2, the logging collector process has been implemented.
-    In the example, we enable logging collector.
+    Since <productname>Pgpool-II</productname> 4.2,
+    the logging collector process has been implemented.
+    When installed using the RPM packages, the logging
+    collector process (<xref linkend="guc-logging-collector">)
+    is enabled by default. Log files are output to
+    <filename>/var/log/pgpool_log</filename> by default.
+    Configure the logging related configuration parameters
+    as needed to meet your requirements.
    </para>
    <programlisting>
 log_destination = 'stderr'
@@ -1148,24 +1176,18 @@ log_directory = '/var/log/pgpool_log'
 log_filename = 'pgpool-%a.log'
 log_truncate_on_rotation = on
 log_rotation_age = 1d
-log_rotation_size = 10MB
-   </programlisting>
-   <para>
-    Create the log directory on all servers.
-   </para>
-   <programlisting>
-[all servers]# mkdir /var/log/pgpool_log/
-[all servers]# chown postgres:postgres /var/log/pgpool_log/
    </programlisting>
 
   <para>
-   The configuration of <filename>pgpool.conf</filename> on server1 is completed.
-   Copy the <filename>pgpool.conf</filename> to other
-   <productname>Pgpool-II</productname> nodes (server2 and server3).
+   The configurations of Pgpool-II on <literal>server1</literal> are completed.
+   Finally, copy the configuration files to <literal>server2</literal>
+   and <literal>server3</literal>.
   </para>
   <programlisting>
-[server1]# scp -p /etc/pgpool-II/pgpool.conf root@server2:/etc/pgpool-II/pgpool.conf
-[server1]# scp -p /etc/pgpool-II/pgpool.conf root@server3:/etc/pgpool-II/pgpool.conf
+[root@server1 ~]# scp -p /etc/pgpool-II/{*.conf,*.sh,pool_passwd} server2:/etc/pgpool-II/
+[root@server1 ~]# ssh server2 "chown postgres:postgres /etc/pgpool-II/{*.conf,*.sh,pool_passwd}"
+[root@server1 ~]# scp -p /etc/pgpool-II/{*.conf,*.sh,pool_passwd} server3:/etc/pgpool-II/
+[root@server1 ~]# ssh server3 "chown postgres:postgres /etc/pgpool-II/{*.conf,*.sh,pool_passwd}"
   </programlisting>
   </sect3>
  </sect2>
@@ -1192,8 +1214,7 @@ log_rotation_size = 10MB
       using the following command.
      </para>
      <programlisting>
-[server1]# su - postgres
-[server1]$ /usr/pgsql-16/bin/pg_ctl start -D $PGDATA
+[root@server1 ~]# su - postgres -c "/usr/pgsql-17/bin/pg_ctl start"
      </programlisting>
      <para>
       Start <productname>Pgpool-II</productname> on <literal>server1</literal>,
@@ -1299,9 +1320,9 @@ server3:9999 Linux server3 server3 9999 9000 7 STANDBY 0 MEMBER # running as STA
     <productname>Pgpool-II</productname> service.
    </para>
    <programlisting>
-[server1]# systemctl stop pgpool.service
+[root@server1 ~]# systemctl stop pgpool.service
 
-[server1]# pcp_watchdog_info -p 9898 -h 192.168.100.50 -U pgpool -W
+[root@server1 ~]# pcp_watchdog_info -p 9898 -h 192.168.100.50 -U pgpool -W
 Password:
 3 3 YES server2:9999 Linux server2 server2
 
@@ -1315,9 +1336,9 @@ server3:9999 Linux server3 server3 9999 9000 7 STANDBY 0 MEMBER   # server3 is r
     as a <literal>STANDBY</literal>.
    </para>
    <programlisting>
-[server1]# systemctl start pgpool.service
+[root@server1 ~]# systemctl start pgpool.service
 
-[server1]# pcp_watchdog_info -p 9898 -h 192.168.100.50 -U pgpool -W
+[root@server1 ~]# pcp_watchdog_info -p 9898 -h 192.168.100.50 -U pgpool -W
 Password: 
 3 3 YES server2:9999 Linux server2 server2
 
@@ -1335,7 +1356,7 @@ server3:9999 Linux server3 server3 9999 9000 7 STANDBY 0 MEMBER
     and verify the backend information.
    </para>
    <programlisting>
-# psql -h 192.168.100.50 -p 9999 -U pgpool postgres -c "show pool_nodes"
+[any server]# psql -h 192.168.100.50 -p 9999 -U pgpool postgres -c "show pool_nodes"
 Password for user pgpool:
  node_id | hostname | port | status | pg_status | lb_weight |  role   | pg_role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change
 ---------+----------+------+--------+-----------+-----------+---------+---------+------------+-------------------+-------------------+-------------------+------------------------+---------------------
@@ -1350,7 +1371,7 @@ Password for user pgpool:
     automatically.
    </para>
    <programlisting>
-[server1]$ pg_ctl -D /var/lib/pgsql/16/data -m immediate stop
+[root@server1 ~]# su - postgres -c "/usr/pgsql-17/bin/pg_ctl -m immediate stop"
    </programlisting>
    <para>
     After stopping <productname>PostgreSQL</productname> on
@@ -1375,17 +1396,17 @@ Password for user pgpool:
    </para>
 
    <programlisting>
-[server3]# psql -h server3 -p 5432 -U pgpool postgres -c "select pg_is_in_recovery()"
+[any server]# psql -h server3 -p 5432 -U pgpool postgres -c "select pg_is_in_recovery()"
 pg_is_in_recovery 
 -------------------
 t
 
-[server2]# psql -h server2 -p 5432 -U pgpool postgres -c "select pg_is_in_recovery()"
+[any server]# psql -h server2 -p 5432 -U pgpool postgres -c "select pg_is_in_recovery()"
 pg_is_in_recovery 
 -------------------
 f
 
-[server2]# psql -h server2 -p 5432 -U pgpool postgres -c "select * from pg_stat_replication" -x
+[any server]# psql -h server2 -p 5432 -U pgpool postgres -c "select * from pg_stat_replication" -x
 -[ RECORD 1 ]----+------------------------------
 pid              | 7198
 usesysid         | 16385