ใใฎ่จญๅฎไพใงใฏใ3ๅฐใฎ<productname>Pgpool-II</productname>ใไฝฟใฃใฆ<productname>PostgreSQL</productname>๏ผใใฉใคใใช1ๅฐใในใฟใณใใค2ๅฐ๏ผใ็ฎก็ใใๅไธ้ๅฎณ็นใในใใชใใใใฌใคใณใฎ่ตทใใชใๅ
็ขใชใฏใฉในใฟใ้็จใใใใจใๅฏ่ฝใงใใ
</para>
<para>
- ใใฎ่จญๅฎไพใงใฏ<emphasis><productname>PostgreSQL</productname> 17</emphasis>ใไฝฟใฃใฆใใพใใใ
- ๅ็จฎในใฏใชใใใฏ<productname>PostgreSQL</productname> 10ไปฅ้ใงใฎๅไฝ็ขบ่ชใ่กใฃใฆใใพใใ
+ ใใฎ่จญๅฎไพใงใฏ<emphasis><productname>PostgreSQL</productname> 18</emphasis>ใไฝฟใฃใฆใใพใใ
</para>
<sect2 id="example-cluster-requirement">
<title>ๅๆๆกไปถ</title>
<title>ๅ
จไฝๆงๆ</title>
<para>
ไปๅใฏใLinuxใตใผใใ3ๅฐ็จๆใใใใใใใฎใในใๅใฏ<literal>server1</literal>ใ<literal>server2</literal>ใ<literal>server3</literal>ใจใใพใใ
- ไฝฟ็จใใOSใฏใในใฆ<emphasis>Rocky Linux 9</emphasis>ใจใใพใใ
+ ไฝฟ็จใใOSใฏใในใฆ<emphasis>Rocky Linux 10</emphasis>ใจใใพใใ
ใใใใใฎใตใผใใซ<productname>PostgreSQL</productname>ใจ<productname>Pgpool-II</productname>ใใคใณในใใผใซใใพใใ
3ๅฐใฎ<productname>PostgreSQL</productname>ใในใใชใผใใณใฐใฌใใชใฑใผใทใงใณๆงๆใซใชใใพใใๅ
จไฝๆงๆๅณใฏไปฅไธใฎ้ใใงใใ
</para>
<tbody>
<row>
<entry>PostgreSQLใใผใธใงใณ</entry>
- <entry>17.0</entry>
+ <entry>18.0</entry>
<entry>-</entry>
</row>
<row>
</row>
<row>
<entry>$PGDATA</entry>
- <entry>/var/lib/pgsql/17/data</entry>
+ <entry>/var/lib/pgsql/18/data</entry>
<entry>-</entry>
</row>
<row>
<tbody>
<row>
<entry>Pgpool-IIใใผใธใงใณ</entry>
- <entry>4.6.0</entry>
+ <entry>4.6.1</entry>
<entry>-</entry>
</row>
<row>
<productname>PostgreSQL</productname>ใฎใคใณในใใผใซใฏ<productname>PostgreSQL</productname>ใณใใฅใใใฃใฎใชใใธใใชใไฝฟใใพใใ
</para>
<programlisting>
-[ๅ
จใตใผใ]# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
+[ๅ
จใตใผใ]# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm
[ๅ
จใตใผใ]# dnf -qy module disable postgresql
-[ๅ
จใตใผใ]# dnf install -y postgresql17-server
+[ๅ
จใตใผใ]# dnf install -y postgresql18-server
</programlisting>
<para>
exclude=pgpool*
+[pgdg18]
+...
+exclude=pgpool*
+
[pgdg17]
...
exclude=pgpool*
[pgdg13]
...
-exclude=pgpool*
-
-[pgdg12]
-...
exclude=pgpool*
</programlisting>
</para>
<programlisting>
-[ๅ
จใตใผใ]# 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-*
+[ๅ
จใตใผใ]# dnf install -y https://www.pgpool.net/yum/rpms/4.6/redhat/rhel-10-x86_64/pgpool-II-release-4.6-1.noarch.rpm
+[ๅ
จใตใผใ]# dnf install -y --enablerepo=crb pgpool-II-pg18-*
</programlisting>
</sect2>
<title>firewallใฎ่จญๅฎ</title>
<para>
<productname>Pgpool-II</productname>ใ<productname>PostgreSQL</productname>ใซๆฅ็ถใใ้ใซใฏใใใกใคใขใผใฆใฉใผใซใซใใฃใฆ็ฎ็ใฎใใผใใ้ใใใใฆใใชใใใฐใชใใพใใใ
- <systemitem>Rocky Linux 9/RHEL 9</systemitem>ใฎๅ ดๅใไปฅไธใฎใใใซ่จญๅฎใใพใใ
+ <systemitem>Rocky Linux 10/RHEL 10</systemitem>ใฎๅ ดๅใไปฅไธใฎใใใซ่จญๅฎใใพใใ
</para>
<programlisting>
[ๅ
จใตใผใ]# firewall-cmd --permanent --zone=public --add-service=postgresql
</para>
<para>
ใพใใใใผใฟใใผในใฏใฉในใฟใฎๅๆๅใ่กใใพใใ
- <productname>PostgreSQL</productname> 17ใงใฏใใผใฟใใผในใฏใฉในใฟใฎใใใฉใซใใฎไฝๆๅ
ใฏ<filename>/var/lib/pgsql/17/data</filename>ใงใ<literal>postgres</literal>ใฆใผใถใฎ่จญๅฎใใกใคใซ<filename>~/.bash_profile</filename>ใง็ฐๅขๅคๆฐ<varname>PGDATA</varname>ใซๆๅฎใใใฆใใพใใ
+ <productname>PostgreSQL</productname> 18ใงใฏใใผใฟใใผในใฏใฉในใฟใฎใใใฉใซใใฎไฝๆๅ
ใฏ<filename>/var/lib/pgsql/18/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>ใๆๅฎใใฆใใใผใฟใใผในใฎใจใณใณใผใใฃใณใฐใใญใฑใผใซใ่จญๅฎใใฆใใ ใใใ
+ ๅฟ
่ฆใซๅฟใใฆใ<literal>--encoding</literal>ใ<literal>--locale</literal><ulink url="https://www.postgresql.org/docs/18/app-initdb.html">ใชใใทใงใณ</ulink>ใๆๅฎใใฆใใใผใฟใใผในใฎใจใณใณใผใใฃใณใฐใใญใฑใผใซใ่จญๅฎใใฆใใ ใใใ
</para>
<programlisting>
[root@server1 ~]# su - postgres
-[postgres@server1 ~]$ /usr/pgsql-17/bin/initdb
+[postgres@server1 ~]$ /usr/pgsql-18/bin/initdb
</programlisting>
<para>
ๆๅพใซใ<literal>server1</literal>ใง<productname>PostgreSQL</productname>ใ่ตทๅใใพใใ
</para>
<programlisting>
-[postgres@server1 ~]$ /usr/pgsql-17/bin/pg_ctl start
+[postgres@server1 ~]$ /usr/pgsql-18/bin/pg_ctl start
</programlisting>
</sect3>
backend_hostname0 = 'server1'
backend_port0 = 5432
backend_weight0 = 1
-backend_data_directory0 = '/var/lib/pgsql/17/data'
+backend_data_directory0 = '/var/lib/pgsql/18/data'
backend_flag0 = 'ALLOW_TO_FAILOVER'
backend_hostname1 = 'server2'
backend_port1 = 5432
backend_weight1 = 1
-backend_data_directory1 = '/var/lib/pgsql/17/data'
+backend_data_directory1 = '/var/lib/pgsql/18/data'
backend_flag1 = 'ALLOW_TO_FAILOVER'
backend_hostname2 = 'server3'
backend_port2 = 5432
backend_weight2 = 1
-backend_data_directory2 = '/var/lib/pgsql/17/data'
+backend_data_directory2 = '/var/lib/pgsql/18/data'
backend_flag2 = 'ALLOW_TO_FAILOVER'
</programlisting>
<programlisting>
[root@server1 ~]# vi /etc/pgpool-II/failover.sh
...
-PGHOME=/usr/pgsql-17
+PGHOME=/usr/pgsql-18
...
[root@server1 ~]# vi /etc/pgpool-II/follow_primary.sh
...
-PGHOME=/usr/pgsql-17
+PGHOME=/usr/pgsql-18
...
</programlisting>
<para>
ๅบๆฌ็ใซใฏ<emphasis>PGHOME</emphasis>ใ็ฐๅขใซๅใใใฆๅคๆดใใใฐใๅไฝใใพใใ
</para>
<programlisting>
-[root@server1 ~]# vi /var/lib/pgsql/17/data/recovery_1st_stage
+[root@server1 ~]# vi /var/lib/pgsql/18/data/recovery_1st_stage
...
-PGHOME=/usr/pgsql-17
+PGHOME=/usr/pgsql-18
...
-[root@server1 ~]# vi /var/lib/pgsql/17/data/pgpool_remote_start
+[root@server1 ~]# vi /var/lib/pgsql/18/data/pgpool_remote_start
...
-PGHOME=/usr/pgsql-17
+PGHOME=/usr/pgsql-18
...
</programlisting>
<productname>PostgreSQL</productname>ใใฉใคใใชใตใผใใใพใ ่ตทๅใใฆใใชใๅ ดๅใฏใใพใๆฌกใฎใณใใณใใๅฎ่กใใฆ<productname>PostgreSQL</productname>่ตทๅใใพใใ
</para>
<programlisting>
-[root@server1 ~]# su - postgres -c "/usr/pgsql-17/bin/pg_ctl start"
+[root@server1 ~]# su - postgres -c "/usr/pgsql-18/bin/pg_ctl start"
</programlisting>
<para>
<literal>server1</literal>ใ<literal>server2</literal>ใใใณ<literal>server3</literal>ใงไปฅไธใฎใณใใณใใๅฎ่กใใ<productname>Pgpool-II</productname>ใ่ตทๅใใพใใ
ใใงใคใซใชใผใใใใใฉใใ็ขบ่ชใใฆใฟใพใใ
</para>
<programlisting>
-[root@server1 ~]# su - postgres -c "/usr/pgsql-17/bin/pg_ctl -m immediate stop"
+[root@server1 ~]# su - postgres -c "/usr/pgsql-18/bin/pg_ctl -m immediate stop"
</programlisting>
<para>
<literal>ใใผใ1</literal>ใๅๆญขใใๅพใซใใใงใคใซใชใผใใ็บ็ใใ<literal>server2</literal>ใ
ใฌใใชใฑใผใทใงใณใ่กใ็นใฏใใคใใฃใใฌใใชใฑใผใทใงใณใขใผใใจๅใใงใใ
</para>
<para>
- ใใฎ่จญๅฎไพใงใฏ<productname>PostgreSQL</productname> 15ใไฝฟใฃใฆใใพใใใ
- ๅ็จฎในใฏใชใใใฏ<productname>PostgreSQL</productname> 10ไปฅ้ใงใฎๅไฝ็ขบ่ชใ่กใฃใฆใใพใใ
+ ใใฎ่จญๅฎไพใงใฏ<productname>PostgreSQL</productname> 18ใไฝฟใฃใฆใใพใใ
</para>
<sect2 id="example-replication-mode-structure">
ใใฎ่จญๅฎไพใงใฏใPgpool-II 1ๅฐใPostgreSQL 3ๅฐใ็จใใฆใPgpool-IIใฎใฌใใชใฑใผใทใงใณๆฉ่ฝใ่ชฌๆใใพใใ
</para>
<para>
- ็ฉ็ใตใผใใ3ๅฐ็จๆใใใใใใใฎใในใๅใฏ ใserver1ใใใserver2ใใใserver3ใ ใจใใพใใไฝฟ็จใใOSใฏใในใฆCentOS 7.9ใจใใพใใ
+ ็ฉ็ใตใผใใ3ๅฐ็จๆใใใใใใใฎใในใๅใฏ ใserver1ใใใserver2ใใใserver3ใ ใจใใพใใไฝฟ็จใใOSใฏใในใฆRocky Linux 10ใจใใพใใ
ใใใใใฎใตใผใใซPostgreSQLใใคใณในใใผใซใใใใฎไธญใฎ1ๅฐใซPgpool-IIใใคใณในใใผใซใใพใใ
</para>
<para>
<tbody>
<row>
<entry>PostgreSQLใใผใธใงใณ</entry>
- <entry>15.0</entry>
+ <entry>18.0</entry>
<entry>-</entry>
</row>
<row>
</row>
<row>
<entry>$PGDATA</entry>
- <entry>/var/lib/pgsql/15/data</entry>
+ <entry>/var/lib/pgsql/18/data</entry>
<entry>-</entry>
</row>
<row>
<tbody>
<row>
<entry>Pgpool-IIใใผใธใงใณ</entry>
- <entry>4.3.0</entry>
+ <entry>4.6.1</entry>
<entry>-</entry>
</row>
<row>
<productname>PostgreSQL</productname>ใฎใคใณในใใผใซใฏ<productname>PostgreSQL</productname>ใณใใฅใใใฃใฎใชใใธใใชใไฝฟใใพใใ
</para>
<programlisting>
-[ๅ
จใตใผใ]# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
-[ๅ
จใตใผใ]# yum install -y postgresql15-server
+[ๅ
จใตใผใ]# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm
+[ๅ
จใตใผใ]# yum install -y postgresql18-server
</programlisting>
<para>
exclude=pgpool*
-[pgdg15]
+[pgdg18]
...
exclude=pgpool*
-[pgdg14]
+[pgdg17]
...
exclude=pgpool*
-[pgdg13]
+[pgdg16]
...
exclude=pgpool*
-[pgdg12]
+[pgdg15]
...
exclude=pgpool*
-[pgdg11]
+[pgdg14]
...
exclude=pgpool*
-[pgdg10]
+[pgdg13]
...
exclude=pgpool*
</programlisting>
<productname>Pgpool-II</productname>ใใคใณในใใผใซใใพใใ
</para>
<programlisting>
-[ๅ
จใตใผใ]# yum install -y https://www.pgpool.net/yum/rpms/4.4/redhat/rhel-7-x86_64/pgpool-II-release-4.4-1.noarch.rpm
-[ๅ
จใตใผใ]# yum install -y pgpool-II-pg15-*
+[ๅ
จใตใผใ]# yum install -y https://www.pgpool.net/yum/rpms/4.6/redhat/rhel-10-x86_64/pgpool-II-release-4.6-1.noarch.rpm
+[ๅ
จใตใผใ]# yum install -y pgpool-II-pg18-*
</programlisting>
</sect2>
<para>
<productname>Pgpool-II</productname>ใ<productname>PostgreSQL</productname>ใซๆฅ็ถใใ้ใซใฏใ
ใใกใคใขใผใฆใฉใผใซใซใใฃใฆ็ฎ็ใฎใใผใใ้ใใใใฆใใชใใใฐใชใใพใใใ
- <systemitem>CentOS/RHEL7</systemitem>ใฎๅ ดๅใไปฅไธใฎใใใซ่จญๅฎใใพใใ
+ <systemitem>Rocky Linux 10/RHEL 10</systemitem>ใฎๅ ดๅใไปฅไธใฎใใใซ่จญๅฎใใพใใ
</para>
<programlisting>
[ๅ
จใตใผใ]# firewall-cmd --permanent --zone=public --add-service=postgresql
</para>
<programlisting>
[server1]# su - postgres
-[server1]$ /usr/pgsql-15/bin/initdb -E UTF8 --no-locale
+[server1]$ /usr/pgsql-18/bin/initdb -E UTF8 --no-locale
</programlisting>
<para>
ๆฌกใซ<literal>server1</literal>ใซใฆใ่จญๅฎใใกใคใซ<filename>$PGDATA/postgresql.conf</filename>ใไปฅไธใฎใใใซ็ทจ้ใใพใใ
server1ใงไปฅไธใฎใณใใณใใๅฎ่กใใPostgreSQLใ่ตทๅใใพใใ
</para>
<programlisting>
-[server1]$ /usr/pgsql-15/bin/pg_ctl start
+[server1]$ /usr/pgsql-18/bin/pg_ctl start
</programlisting>
<para>
backend_hostname0 = 'server1'
backend_port0 = 5432
backend_weight0 = 1
-backend_data_directory0 = '/var/lib/pgsql/15/data'
+backend_data_directory0 = '/var/lib/pgsql/18/data'
backend_flag0 = 'ALLOW_TO_FAILOVER'
backend_hostname1 = 'server2'
backend_port1 = 5432
backend_weight1 = 1
-backend_data_directory1 = '/var/lib/pgsql/15/data'
+backend_data_directory1 = '/var/lib/pgsql/18/data'
backend_flag1 = 'ALLOW_TO_FAILOVER'
backend_hostname2 = 'server3'
backend_port2 = 5432
backend_weight2 = 1
-backend_data_directory2 = '/var/lib/pgsql/15/data'
+backend_data_directory2 = '/var/lib/pgsql/18/data'
backend_flag2 = 'ALLOW_TO_FAILOVER'
</programlisting>
</sect3>
ใใใใฎใใกใคใซใmainใใผใ(<literal>server1</literal>)ใฎใใผใฟใใผในใฏใฉในใฟ้
ไธใซ้
็ฝฎใใพใใ
</para>
<programlisting>
-[server1]# cp -p /etc/pgpool-II/sample_scripts/replication_mode_recovery_1st_stage.sample /var/lib/pgsql/15/data/recovery_1st_stage.sh
-[server1]# cp -p /etc/pgpool-II/sample_scripts/replication_mode_recovery_2nd_stage.sample /var/lib/pgsql/15/data/recovery_2nd_stage.sh
-[server1]# cp -p /etc/pgpool-II/sample_scripts/pgpool_remote_start.sample /var/lib/pgsql/15/data/pgpool_remote_start
-[server1]# chown postgres:postgres /var/lib/pgsql/15/data/{recovery_1st_stage.sh,recovery_2nd_stage.sh,pgpool_remote_start}
+[server1]# cp -p /etc/pgpool-II/sample_scripts/replication_mode_recovery_1st_stage.sample /var/lib/pgsql/18/data/recovery_1st_stage.sh
+[server1]# cp -p /etc/pgpool-II/sample_scripts/replication_mode_recovery_2nd_stage.sample /var/lib/pgsql/18/data/recovery_2nd_stage.sh
+[server1]# cp -p /etc/pgpool-II/sample_scripts/pgpool_remote_start.sample /var/lib/pgsql/18/data/pgpool_remote_start
+[server1]# chown postgres:postgres /var/lib/pgsql/18/data/{recovery_1st_stage.sh,recovery_2nd_stage.sh,pgpool_remote_start}
</programlisting>
<para>
ๅบๆฌ็ใซใฏ<emphasis>PGHOME</emphasis>ใ็ฐๅขใซๅใใใฆๅคๆดใใใฐใๅไฝใใพใใ
</para>
<programlisting>
-[server1]# vi /var/lib/pgsql/15/data/recovery_1st_stage.sh
+[server1]# vi /var/lib/pgsql/18/data/recovery_1st_stage.sh
...
-PGHOME=/usr/pgsql-15
+PGHOME=/usr/pgsql-18
...
-[server1]# vi /var/lib/pgsql/15/data/recovery_2nd_stage.sh
+[server1]# vi /var/lib/pgsql/18/data/recovery_2nd_stage.sh
...
-PGHOME=/usr/pgsql-15
+PGHOME=/usr/pgsql-18
...
-[server1]# vi /var/lib/pgsql/15/data/pgpool_remote_start
+[server1]# vi /var/lib/pgsql/18/data/pgpool_remote_start
...
-PGHOME=/usr/pgsql-15
+PGHOME=/usr/pgsql-18
...
</programlisting>
pgbenchใไฝฟใฃใฆใใฌใใชใฑใผใทใงใณๆฉ่ฝใ่ฉฆใใฆใฟใพใใใใ
</para>
<programlisting>
-[server1]# /usr/pgsql-15/bin/createdb test -U postgres -p 9999
-[server1]# /usr/pgsql-15/bin/pgbench -h server1 -U postgres -i -p 9999 test
+[server1]# /usr/pgsql-18/bin/createdb test -U postgres -p 9999
+[server1]# /usr/pgsql-18/bin/pgbench -h server1 -U postgres -i -p 9999 test
</programlisting>
<para>
<productname>Pgpool-II</productname>ใฎใฌใใชใฑใผใทใงใณๆฉ่ฝใๆญฃใใๅใใฆใใใใฉใใ็ขบใใใใใใซใ
ใใใใใฎใใผใใซๆฅ็ถใใฆใๅใ็ตๆใ่ฟใใใฉใใ่ฆใฆใฟใพใใ
</para>
<programlisting>
-[server1]# /usr/pgsql-15/bin/psql -h server1 -U postgres -p 5432 test
+[server1]# /usr/pgsql-18/bin/psql -h server1 -U postgres -p 5432 test
test=# \d
List of relations
Schema | Name | Type | Owner
public | pgbench_tellers | table | postgres
(4 rows)
-[server1]# /usr/pgsql-15/bin/psql -h server2 -U postgres -p 5432 test
+[server1]# /usr/pgsql-18/bin/psql -h server2 -U postgres -p 5432 test
test=# \d
List of relations
Schema | Name | Type | Owner
public | pgbench_tellers | table | postgres
(4 rows)
-[server1]# /usr/pgsql-15/bin/psql -h server3 -U postgres -p 5432 test
+[server1]# /usr/pgsql-18/bin/psql -h server3 -U postgres -p 5432 test
test=# \d
List of relations
Schema | Name | Type | Owner
ๆฌกใซใpgbenchใใใฐใใ่ตฐใใใฆใ็ตๆใ่ฆใฆใฟใพใใ
</para>
<programlisting>
-[server1]# /usr/pgsql-15/bin/pgbench -h server1 -U postgres -p 9999 -T 10 test
+[server1]# /usr/pgsql-18/bin/pgbench -h server1 -U postgres -p 9999 -T 10 test
</programlisting>
<para>
ใในใฆใฎPostgreSQLใฏใๅไธใฎ็ตๆใ่ฟใใฆใใพใใ
</para>
<programlisting>
-[server1]# /usr/pgsql-15/bin/psql -h server1 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
+[server1]# /usr/pgsql-18/bin/psql -h server1 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
Password for user postgres:
sum
--------
-99710
(1 row)
-[server1]# /usr/pgsql-15/bin/psql -h server2 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
+[server1]# /usr/pgsql-18/bin/psql -h server2 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
Password for user postgres:
sum
--------
-99710
(1 row)
-[server1]# /usr/pgsql-15/bin/psql -h server3 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
+[server1]# /usr/pgsql-18/bin/psql -h server3 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
Password for user postgres:
sum
--------
mainใใผใใฎๅใๆฟใใ็ขบ่ชใใฆใฟใพใใ
</para>
<programlisting>
-[server1]# su - postgres -c "/usr/pgsql-15/bin/pg_ctl -m i stop"
+[server1]# su - postgres -c "/usr/pgsql-18/bin/pg_ctl -m i stop"
</programlisting>
<para>
<literal>ใใผใ0</literal>ใๅๆญขใใๅพใซใใใผใ0ใๅใ้ขใใใฆใmainใใผใใฎๅใๆฟใใ็บ็ใใใใจใ็ขบ่ชใใพใใ
</para>
<para>
<!--
- <productname>Pgpool-II</productname> community provides RPM packages for RHEL9/8/7
+ <productname>Pgpool-II</productname> community provides RPM packages for RHEL10/9/8
and the operating system which is compatible with RHEL.
You can download package files from
<ulink url="https://www.pgpool.net/yum/">official Pgpool-II repository</ulink>.
-->
- <productname>Pgpool-II</productname>ใณใใฅใใใฃใฏRHEL9/8/7ใใใณไบๆOSๅใใซRPMใใใฑใผใธใๆไพใใฆใใพใใ
+ <productname>Pgpool-II</productname>ใณใใฅใใใฃใฏRHEL10/9/8ใใใณไบๆOSๅใใซRPMใใใฑใผใธใๆไพใใฆใใพใใ
ใใใฑใผใธใใกใคใซใฏ<ulink url="https://www.pgpool.net/yum/">Pgpool-IIใฎๅ
ฌๅผใชใใธใใช</ulink>ใใๅ
ฅๆใงใใพใใ
</para>
<para>
</row>
<row>
<entry>pgpool-II-pgXX-debugsource</entry>
- <entry>RHEL8/9ใฎๅ ดๅใฎใฟใใใใใฐๆ
ๅ ฑใๅซใพใใ</entry>
+ <entry>RHEL10/9/8ใฎๅ ดๅใฎใฟใใใใใฐๆ
ๅ ฑใๅซใพใใ</entry>
</row>
<row>
<entry>pgpool-II-pgXX-extensions-debuginfo</entry>
- <entry>RHEL8/9ใฎๅ ดๅใฎใฟใใใใใฐๆ
ๅ ฑใๅซใพใใ</entry>
+ <entry>RHEL10/9/8ใฎๅ ดๅใฎใฟใใใใใฐๆ
ๅ ฑใๅซใพใใ</entry>
</row>
<row>
<entry>pgpool-II-pgXX-devel</entry>
<productname>Pgpool-II</productname> provides separate packages for each PostgreSQL version.
"XX" in the above package is a two-digit number representing the version of PostgreSQL.
Choose <productname>Pgpool-II</productname> RPM corresponding to your PostgreSQL version.
- (For example, if you are using PostgreSQL 17, you need to install <filename>pgpool-II-pg17</filename>)
+ (For example, if you are using PostgreSQL 18, you need to install <filename>pgpool-II-pg18</filename>)
-->
<productname>Pgpool-II</productname>ใฏ<productname>PostgreSQL</productname>ใฎใฉใคใใฉใชใจๆกๅผตใฎใใฃใฌใฏใใชใๅฟ
่ฆใงใใ
ใใฎใใฃใฌใฏใใชใธใฎใในใฏ<productname>PostgreSQL</productname>ใฎใใผใธใงใณใใจใซ็ฐใชใฃใฆใใใฎใงใ<productname>Pgpool-II</productname>ใฏPostgreSQLใใผใธใงใณใใจใซใใใฑใผใธใๆไพใใฆใใพใใ
- ไธ่จใใใฑใผใธใฎใXXใใฏPostgreSQLใฎใใผใธใงใณใ่กจใ2ๆกใฎๆฐๅคใงใใ<productname>PostgreSQL</productname>ใใผใธใงใณใซๅฏพๅฟใใ<productname>Pgpool-II</productname>ใฎRPMใ้ธใใงใใ ใใใ(ไพใใฐใPostgreSQL 17ใๅฉ็จใใฆใใๅ ดๅใฏใ<filename>pgpool-II-pg17</filename>ใไฝฟ็จใใฆใใ ใใ)
+ ไธ่จใใใฑใผใธใฎใXXใใฏPostgreSQLใฎใใผใธใงใณใ่กจใ2ๆกใฎๆฐๅคใงใใ<productname>PostgreSQL</productname>ใใผใธใงใณใซๅฏพๅฟใใ<productname>Pgpool-II</productname>ใฎRPMใ้ธใใงใใ ใใใ(ไพใใฐใPostgreSQL 18ใๅฉ็จใใฆใใๅ ดๅใฏใ<filename>pgpool-II-pg18</filename>ใไฝฟ็จใใฆใใ ใใ)
</para>
<sect2 id="before-installing">
exclude=pgpool*
+[pgdg18]
+...
+exclude=pgpool*
+
[pgdg17]
...
exclude=pgpool*
[pgdg13]
...
-exclude=pgpool*
-
-[pgdg12]
-...
-exclude=pgpool*
-
-[pgdg11]
-...
exclude=pgpool*
</programlisting>
</sect2>
</para>
<para>
<!--
- The following commands assume that you are using Pgpool-II 4.6.x for PostgreSQL 17 on RHEL9.
+ The following commands assume that you are using Pgpool-II 4.6.x for PostgreSQL 18 on RHEL10.
If you are using other versions, replace "pgXX" with your PostgreSQL version.
-->
- ไปฅไธใฎๆ้ ใฏRHEL9ใซ<productname>PostgreSQL 17</productname>ใซๅฏพๅฟใใ<productname>Pgpool-II 4.6.x</productname>ใใคใณในใใผใซใใใใจใๅๆใจใชใใพใใ
+ ไปฅไธใฎๆ้ ใฏRHEL10ใซ<productname>PostgreSQL 18</productname>ใซๅฏพๅฟใใ<productname>Pgpool-II 4.6.x</productname>ใใคใณในใใผใซใใใใจใๅๆใจใชใใพใใ
ไปใฎใใผใธใงใณใฎ<productname>PostgreSQL</productname>ใๅฉ็จใใฆใใๅ ดๅใฏใ<productname>PostgreSQL</productname>ใฎใใผใธใงใณใซๅฟใใฆใpgXXใใ้ฉๅฎ็ฝฎใๆใใฆใใ ใใใ
</para>
<para>
<!--
First, install the repository corresponding to your <productname>Pgpool-II</productname>
version and distribution.
- For REHL7/9, see <ulink url="https://www.pgpool.net/mediawiki/index.php/Yum_Repository">here</ulink>.
+ For REHL9/8, see <ulink url="https://www.pgpool.net/mediawiki/index.php/Yum_Repository">here</ulink>.
-->
ใพใใPgpool-IIใใผใธใงใณใจใใฃในใใชใใฅใผใทใงใณใซๅฏพๅฟใใใฌใใธใใชใใคใณในใใผใซใใพใใ
- REHL7/8ใฎๅ ดๅใฏใ<ulink url="https://www.pgpool.net/mediawiki/index.php/Yum_Repository">ใใกใ</ulink>ใๅ็
งใใฆใใ ใใใ
+ REHL9/8ใฎๅ ดๅใฏใ<ulink url="https://www.pgpool.net/mediawiki/index.php/Yum_Repository">ใใกใ</ulink>ใๅ็
งใใฆใใ ใใใ
</para>
<programlisting>
-dnf install https://www.pgpool.net/yum/rpms/4.6/redhat/rhel-9-x86_64/pgpool-II-release-4.6-1.noarch.rpm
+dnf install https://www.pgpool.net/yum/rpms/4.6/redhat/rhel-10-x86_64/pgpool-II-release-4.6-1.noarch.rpm
</programlisting>
<para>
<!--
ๆฌกใซใ<productname>Pgpool-II</productname>ใใคใณในใใผใซใใพใใ
</para>
<programlisting>
-dnf install pgpool-II-pg17
+dnf install pgpool-II-pg18
</programlisting>
<para>
<!--
</para>
</note>
<programlisting>
-dnf install pgpool-II-pg17-extensions pgpool-II-pg17
+dnf install pgpool-II-pg18-extensions pgpool-II-pg18
</programlisting>
<para>
<!--
ๅฟ
่ฆใซๅฟใใฆใ้็บ่
ๅใใฎใชใใทใงใณใใใฑใผใธdebuginfoใใใณdevelใใใฑใผใธใใคใณในใใผใซใใพใใ
</para>
<programlisting>
-dnf install pgpool-II-pg17-debuginfo pgpool-II-pg17-devel
+dnf install pgpool-II-pg18-debuginfo pgpool-II-pg18-devel
</programlisting>
</sect2>
<title>Pgpool-IIใฎ่ตทๅใจๅๆญข</title>
<para>
<!--
- On RHEL7,8/CentOS7,8, do this once, if set the automatic startup of <productname>Pgpool-II</productname>.
+ On RHEL10/9/8, do this once, if set the automatic startup of <productname>Pgpool-II</productname>.
-->
- RHEL7/8/9ใงใฏใ<productname>Pgpool-II</productname>ใฎ่ชๅ่ตทๅใ่จญๅฎใใๅ ดๅใไปฅไธใๅฎ่กใใฆใใ ใใใ
+ RHEL10/9/8ใงใฏใ<productname>Pgpool-II</productname>ใฎ่ชๅ่ตทๅใ่จญๅฎใใๅ ดๅใไปฅไธใๅฎ่กใใฆใใ ใใใ
<programlisting>
systemctl enable pgpool.service
</programlisting>
</para>
<para>
<!--
- Here is an example for CentOS/RHEL7 when access
+ Here is an example for Rocky Linux/RHEL10 when access
to <productname>PostgreSQL</productname> is required.
-->
- CentOS/RHEL7ใซใใใฆใ<productname>PostgreSQL</productname>ใซใขใฏใปในใๅฟ
่ฆใชๅ ดๅใฎไพใ็คบใใพใใ
+ Rocky Linux/RHEL10ใซใใใฆใ<productname>PostgreSQL</productname>ใซใขใฏใปในใๅฟ
่ฆใชๅ ดๅใฎไพใ็คบใใพใใ
<programlisting>
firewall-cmd --permanent --zone=public --add-service=postgresql
firewall-cmd --reload
servers to create a robust cluster system and avoid the single point of failure or split brain.
</para>
<para>
- <emphasis><productname>PostgreSQL</productname> 17</emphasis> is used in this configuration example.
- All scripts have been tested with <productname>PostgreSQL</productname> 10 and later.
+ <emphasis><productname>PostgreSQL</productname> 18</emphasis> is used in this configuration example.
</para>
<sect2 id="example-cluster-requirement">
<title>Requirements</title>
<sect2 id="example-cluster-structure">
<title>Cluster System Configuration</title>
<para>
- We use three servers with <emphasis>Rocky Linux 9</emphasis> installed and
+ We use three servers with <emphasis>Rocky Linux 10</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.
<tbody>
<row>
<entry>PostgreSQL Version</entry>
- <entry>17.0</entry>
+ <entry>18.0</entry>
<entry>-</entry>
</row>
<row>
</row>
<row>
<entry>$PGDATA</entry>
- <entry>/var/lib/pgsql/17/data</entry>
+ <entry>/var/lib/pgsql/18/data</entry>
<entry>-</entry>
</row>
<row>
<tbody>
<row>
<entry>Pgpool-II Version</entry>
- <entry>4.6.0</entry>
+ <entry>4.6.1</entry>
<entry>-</entry>
</row>
<row>
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-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
+[all servers]# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm
[all servers]# dnf -qy module disable postgresql
-[all servers]# dnf install -y postgresql17-server
+[all servers]# dnf install -y postgresql18-server
</programlisting>
<para>
Since <productname>Pgpool-II</productname> related packages are also included in <productname>PostgreSQL</productname> YUM repository,
...
exclude=pgpool*
+[pgdg18]
+...
+exclude=pgpool*
+
[pgdg17]
...
exclude=pgpool*
[pgdg13]
...
-exclude=pgpool*
-
-[pgdg12]
-...
exclude=pgpool*
</programlisting>
</para>
<programlisting>
[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-*
+[all servers]# dnf install -y --enablerepo=crb pgpool-II-pg18-*
</programlisting>
</sect2>
<sect3 id="example-cluster-before-starting-firewall">
<title>Setting up firewall</title>
<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>.
+ 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 10/RHEL 10</systemitem>.
</para>
<programlisting>
[all servers]# firewall-cmd --permanent --zone=public --add-service=postgresql
<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>,
+ In <productname>PostgreSQL</productname> 18, the default directory
+ for creating the database cluster is <filename>/var/lib/pgsql/18/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>
+ Specify <ulink url="https://www.postgresql.org/docs/18/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
+[postgres@server1 ~]$ /usr/pgsql-18/bin/initdb
</programlisting>
<para>
Start <productname>PostgreSQL</productname> on <literal>server1</literal>.
</para>
<programlisting>
-[postgres@server1 ~]$ /usr/pgsql-17/bin/pg_ctl start
+[postgres@server1 ~]$ /usr/pgsql-18/bin/pg_ctl start
</programlisting>
</sect3>
backend_hostname0 = 'server1'
backend_port0 = 5432
backend_weight0 = 1
-backend_data_directory0 = '/var/lib/pgsql/17/data'
+backend_data_directory0 = '/var/lib/pgsql/18/data'
backend_flag0 = 'ALLOW_TO_FAILOVER'
backend_hostname1 = 'server2'
backend_port1 = 5432
backend_weight1 = 1
-backend_data_directory1 = '/var/lib/pgsql/17/data'
+backend_data_directory1 = '/var/lib/pgsql/18/data'
backend_flag1 = 'ALLOW_TO_FAILOVER'
backend_hostname2 = 'server3'
backend_port2 = 5432
backend_weight2 = 1
-backend_data_directory2 = '/var/lib/pgsql/17/data'
+backend_data_directory2 = '/var/lib/pgsql/18/data'
backend_flag2 = 'ALLOW_TO_FAILOVER'
</programlisting>
<para>
<programlisting>
[root@server1 ~]# vi /etc/pgpool-II/failover.sh
...
-PGHOME=/usr/pgsql-17
+PGHOME=/usr/pgsql-18
...
[root@server1 ~]# vi /etc/pgpool-II/follow_primary.sh
...
-PGHOME=/usr/pgsql-17
+PGHOME=/usr/pgsql-18
...
</programlisting>
Basically, it should work if you change <emphasis>PGHOME</emphasis> according to PostgreSQL installation directory.
</para>
<programlisting>
-[root@server1 ~]# vi /var/lib/pgsql/17/data/recovery_1st_stage
+[root@server1 ~]# vi /var/lib/pgsql/18/data/recovery_1st_stage
...
-PGHOME=/usr/pgsql-17
+PGHOME=/usr/pgsql-18
...
-[root@server1 ~]# vi /var/lib/pgsql/17/data/pgpool_remote_start
+[root@server1 ~]# vi /var/lib/pgsql/18/data/pgpool_remote_start
...
-PGHOME=/usr/pgsql-17
+PGHOME=/usr/pgsql-18
...
</programlisting>
using the following command.
</para>
<programlisting>
-[root@server1 ~]# su - postgres -c "/usr/pgsql-17/bin/pg_ctl start"
+[root@server1 ~]# su - postgres -c "/usr/pgsql-18/bin/pg_ctl start"
</programlisting>
<para>
Start <productname>Pgpool-II</productname> on <literal>server1</literal>,
automatically.
</para>
<programlisting>
-[root@server1 ~]# su - postgres -c "/usr/pgsql-17/bin/pg_ctl -m immediate stop"
+[root@server1 ~]# su - postgres -c "/usr/pgsql-18/bin/pg_ctl -m immediate stop"
</programlisting>
<para>
After stopping <productname>PostgreSQL</productname> on
the visibility consistency among nodes.
</para>
<para>
- <productname>PostgreSQL</productname> 14 is used in this configuration example.
- All scripts have been tested with <productname>PostgreSQL</productname> 10 and later.
+ <productname>PostgreSQL</productname> 18 is used in this configuration example.
</para>
<sect2 id="example-replication-mode-structure">
replication.
</para>
<para>
- In this example we use 3 servers with CentOS 7.9 installed.
+ In this example we use 3 servers with Rocky Linux 10 installed.
Let these servers be <literal>server1</literal>,
<literal>server2</literal>, <literal>server3</literal>.
We install <productname>PostgreSQL</productname> on all servers and
<tbody>
<row>
<entry>PostgreSQL Version</entry>
- <entry>14.0</entry>
+ <entry>18.0</entry>
<entry>-</entry>
</row>
<row>
</row>
<row>
<entry>$PGDATA</entry>
- <entry>/var/lib/pgsql/14/data</entry>
+ <entry>/var/lib/pgsql/18/data</entry>
<entry>-</entry>
</row>
<row>
Install <productname>PostgreSQL</productname> from <productname>PostgreSQL</productname> YUM repository.
</para>
<programlisting>
-[all servers]# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
-[all servers]# yum install -y postgresql14-server
+[all servers]# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm
+[all servers]# yum install -y postgresql18-server
</programlisting>
<para>
...
exclude=pgpool*
-[pgdg14]
+[pgdg18]
...
exclude=pgpool*
-[pgdg13]
+[pgdg17]
...
exclude=pgpool*
-[pgdg12]
+[pgdg16]
...
exclude=pgpool*
-[pgdg11]
+[pgdg15]
...
exclude=pgpool*
-[pgdg10]
+[pgdg14]
...
exclude=pgpool*
-[pgdg96]
+[pgdg13]
+...
+exclude=pgpool*
...
exclude=pgpool*
</programlisting>
Install <productname>Pgpool-II</productname> using Pgpool-II YUM repository.
</para>
<programlisting>
-[all servers]# yum install -y https://www.pgpool.net/yum/rpms/4.4/redhat/rhel-7-x86_64/pgpool-II-release-4.4-1.noarch.rpm
-[all servers]# yum install -y pgpool-II-pg14-*
+[all servers]# yum install -y https://www.pgpool.net/yum/rpms/4.6/redhat/rhel-10-x86_64/pgpool-II-release-4.6-1.noarch.rpm
+[all servers]# yum install -y pgpool-II-pg18-*
</programlisting>
</sect2>
<sect3 id="example-replication-mode-firewall">
<title>Configure firewall</title>
<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>CentOS/RHEL7</systemitem>.
+ 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 10</systemitem>.
</para>
<programlisting>
[all servers]# firewall-cmd --permanent --zone=public --add-service=postgresql
</para>
<programlisting>
[server1]# su - postgres
-[server1]$ /usr/pgsql-14/bin/initdb -E UTF8 --no-locale
+[server1]$ /usr/pgsql-18/bin/initdb -E UTF8 --no-locale
</programlisting>
<para>
Then edit <filename>$PGDATA/postgresql.conf</filename> on server1.
Run the following command to start PostgreSQL server.
</para>
<programlisting>
-[server1]$ /usr/pgsql-14/bin/pg_ctl start
+[server1]$ /usr/pgsql-18/bin/pg_ctl start
</programlisting>
<para>
backend_hostname0 = 'server1'
backend_port0 = 5432
backend_weight0 = 1
-backend_data_directory0 = '/var/lib/pgsql/14/data'
+backend_data_directory0 = '/var/lib/pgsql/18/data'
backend_flag0 = 'ALLOW_TO_FAILOVER'
backend_hostname1 = 'server2'
backend_port1 = 5432
backend_weight1 = 1
-backend_data_directory1 = '/var/lib/pgsql/14/data'
+backend_data_directory1 = '/var/lib/pgsql/18/data'
backend_flag1 = 'ALLOW_TO_FAILOVER'
backend_hostname2 = 'server3'
backend_port2 = 5432
backend_weight2 = 1
-backend_data_directory2 = '/var/lib/pgsql/14/data'
+backend_data_directory2 = '/var/lib/pgsql/18/data'
backend_flag2 = 'ALLOW_TO_FAILOVER'
</programlisting>
</sect3>
Create the scripts used by online recovery command from sample scripts and copy these files to the database cluster directory.
</para>
<programlisting>
-[server1]# cp -p /etc/pgpool-II/sample_scripts/replication_mode_recovery_1st_stage.sample /var/lib/pgsql/14/data/recovery_1st_stage
-[server1]# cp -p /etc/pgpool-II/sample_scripts/replication_mode_recovery_2nd_stage.sample /var/lib/pgsql/14/data/recovery_2nd_stage
-[server1]# cp -p /etc/pgpool-II/sample_scripts/pgpool_remote_start.sample /var/lib/pgsql/14/data/pgpool_remote_start
-[server1]# chown postgres:postgres /var/lib/pgsql/14/data/{recovery_1st_stage,recovery_2nd_stage,pgpool_remote_start}
+[server1]# cp -p /etc/pgpool-II/sample_scripts/replication_mode_recovery_1st_stage.sample /var/lib/pgsql/18/data/recovery_1st_stage
+[server1]# cp -p /etc/pgpool-II/sample_scripts/replication_mode_recovery_2nd_stage.sample /var/lib/pgsql/18/data/recovery_2nd_stage
+[server1]# cp -p /etc/pgpool-II/sample_scripts/pgpool_remote_start.sample /var/lib/pgsql/18/data/pgpool_remote_start
+[server1]# chown postgres:postgres /var/lib/pgsql/18/data/{recovery_1st_stage,recovery_2nd_stage,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/14/data/recovery_1st_stage
+[server1]# vi /var/lib/pgsql/18/data/recovery_1st_stage
...
-PGHOME=/usr/pgsql-14
+PGHOME=/usr/pgsql-18
...
-[server1]# vi /var/lib/pgsql/14/data/recovery_2nd_stage
+[server1]# vi /var/lib/pgsql/18/data/recovery_2nd_stage
...
-PGHOME=/usr/pgsql-14
+PGHOME=/usr/pgsql-18
...
-[server1]# vi /var/lib/pgsql/14/data/pgpool_remote_start
+[server1]# vi /var/lib/pgsql/18/data/pgpool_remote_start
...
-PGHOME=/usr/pgsql-14
+PGHOME=/usr/pgsql-18
...
</programlisting>
Next, let's verify the replication functionality using a benchmark tool pgbench.
</para>
<programlisting>
-[server1]# /usr/pgsql-14/bin/createdb test -U postgres -p 9999
-[server1]# /usr/pgsql-14/bin/pgbench -h server1 -U postgres -i -p 9999 test
+[server1]# /usr/pgsql-18/bin/createdb test -U postgres -p 9999
+[server1]# /usr/pgsql-18/bin/pgbench -h server1 -U postgres -i -p 9999 test
</programlisting>
<para>
To check if the replication works correctly, directly connect to each PostgreSQL
server to see if they return identical results.
</para>
<programlisting>
-[server1]# /usr/pgsql-14/bin/psql -h server1 -U postgres -p 5432 test
+[server1]# /usr/pgsql-18/bin/psql -h server1 -U postgres -p 5432 test
test=# \d
List of relations
Schema | Name | Type | Owner
public | pgbench_tellers | table | postgres
(4 rows)
-[server1]# /usr/pgsql-14/bin/psql -h server2 -U postgres -p 5432 test
+[server1]# /usr/pgsql-18/bin/psql -h server2 -U postgres -p 5432 test
test=# \d
List of relations
Schema | Name | Type | Owner
public | pgbench_tellers | table | postgres
(4 rows)
-[server1]# /usr/pgsql-14/bin/psql -h server3 -U postgres -p 5432 test
+[server1]# /usr/pgsql-18/bin/psql -h server3 -U postgres -p 5432 test
test=# \d
List of relations
Schema | Name | Type | Owner
Next, let's run pgbench for a while and check to results.
</para>
<programlisting>
-[server1]# /usr/pgsql-14/bin/pgbench -h server1 -U postgres -p 9999 -T 10 test
+[server1]# /usr/pgsql-18/bin/pgbench -h server1 -U postgres -p 9999 -T 10 test
</programlisting>
<para>
All PostgreSQL servers return identical results.
</para>
<programlisting>
-[server1]# /usr/pgsql-14/bin/psql -h server1 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
+[server1]# /usr/pgsql-18/bin/psql -h server1 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
Password for user postgres:
sum
--------
-99710
(1 row)
-[server1]# /usr/pgsql-14/bin/psql -h server2 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
+[server1]# /usr/pgsql-18/bin/psql -h server2 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
Password for user postgres:
sum
--------
-99710
(1 row)
-[server1]# /usr/pgsql-14/bin/psql -h server3 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
+[server1]# /usr/pgsql-18/bin/psql -h server3 -U postgres -p 5432 test -c "SELECT sum(abalance) FROM pgbench_accounts"
Password for user postgres:
sum
--------
and verify the switchover of the main node.
</para>
<programlisting>
-[server1]# su - postgres -c "/usr/pgsql-14/bin/pg_ctl -m i stop"
+[server1]# su - postgres -c "/usr/pgsql-18/bin/pg_ctl -m i stop"
</programlisting>
<para>
After stopping <productname>PostgreSQL</productname> on <literal>server1</literal>,
If you are going to install from the source code, please check <xref linkend="install-source">.
</para>
<para>
- <productname>Pgpool-II</productname> community provides RPM packages for RHEL9/8/7
+ <productname>Pgpool-II</productname> community provides RPM packages for RHEL10/9/8
and the operating system which is compatible with RHEL.
You can download package files from
<ulink url="https://www.pgpool.net/yum/">official Pgpool-II repository</ulink>.
</row>
<row>
<entry>pgpool-II-pgXX-debugsource</entry>
- <entry>Only for RHEL8/9. Debug symbols for debugging</entry>
+ <entry>Only for RHEL10/9/8. Debug symbols for debugging</entry>
</row>
<row>
<entry>pgpool-II-pgXX-extensions-debuginfo</entry>
- <entry>Only for RHEL8/9. Debug symbols for debugging</entry>
+ <entry>Only for RHEL10/9/8. Debug symbols for debugging</entry>
</row>
<row>
<entry>pgpool-II-pgXX-devel</entry>
<productname>Pgpool-II</productname> provides separate packages for each PostgreSQL version.
"XX" in the above package is a two-digit number representing the version of PostgreSQL.
Choose <productname>Pgpool-II</productname> RPM corresponding to your PostgreSQL version.
- (For example, if you are using PostgreSQL 17, you need to install <filename>pgpool-II-pg17</filename>)
+ (For example, if you are using PostgreSQL 18, you need to install <filename>pgpool-II-pg18</filename>)
</para>
<sect2 id="before-installing">
...
exclude=pgpool*
+[pgdg18]
+...
+exclude=pgpool*
+
[pgdg17]
...
exclude=pgpool*
[pgdg13]
...
-exclude=pgpool*
-
-[pgdg12]
-...
-exclude=pgpool*
-
-[pgdg11]
-...
exclude=pgpool*
</programlisting>
</sect2>
</para>
<para>
- The following commands assume that you are using Pgpool-II 4.6.x for PostgreSQL 17 on RHEL9.
+ The following commands assume that you are using Pgpool-II 4.6.x for PostgreSQL 18 on RHEL10.
If you are using other versions, replace "pgXX" with your PostgreSQL version.
</para>
<para>
First, install the repository corresponding to your <productname>Pgpool-II</productname>
version and distribution.
- For REHL7/8, see <ulink url="https://www.pgpool.net/mediawiki/index.php/Yum_Repository">here</ulink>.
+ For REHL9/8, see <ulink url="https://www.pgpool.net/mediawiki/index.php/Yum_Repository">here</ulink>.
</para>
<programlisting>
-dnf install https://www.pgpool.net/yum/rpms/4.6/redhat/rhel-9-x86_64/pgpool-II-release-4.6-1.noarch.rpm
+dnf install https://www.pgpool.net/yum/rpms/4.6/redhat/rhel-10-x86_64/pgpool-II-release-4.6-1.noarch.rpm
</programlisting>
<para>
Then, install <productname>Pgpool-II</productname>.
</para>
<programlisting>
-dnf install pgpool-II-pg17
+dnf install pgpool-II-pg18
</programlisting>
<para>
- To use online recovery feature, install <filename>pgpool-II-pg17-extensions</filename>
+ To use online recovery feature, install <filename>pgpool-II-pg18-extensions</filename>
on <emphasis>all PostgreSQL servers</emphasis>.
Because <filename>pgpool-II-pgXX-extensions</filename> depends on
<filename>pgpool-II-pgXX</filename> package,
</para>
</note>
<programlisting>
-dnf install pgpool-II-pg17-extensions pgpool-II-pg17
+dnf install pgpool-II-pg18-extensions pgpool-II-pg18
</programlisting>
<para>
Optionally you can install debuginfo and devel packages for developers if necessary.
</para>
<programlisting>
-dnf install pgpool-II-pg17-debuginfo pgpool-II-pg17-devel
+dnf install pgpool-II-pg18-debuginfo pgpool-II-pg18-devel
</programlisting>
</sect2>
<sect2 id="start-rpm">
<title>Starting/stopping Pgpool-II</title>
<para>
- On RHEL9/8/7, do this once, if set the automatic startup of <productname>Pgpool-II</productname>.
+ On RHEL10/9/8, do this once, if set the automatic startup of <productname>Pgpool-II</productname>.
<programlisting>
systemctl enable pgpool.service
</programlisting>
</para>
<para>
- Here is an example for CentOS/RHEL7 when access
+ Here is an example for Rocky Linux/RHEL10 when access
to <productname>PostgreSQL</productname> is required.
<programlisting>