2.10. Installation from RPM

This chapter describes the installation of Pgpool-II from RPM. If you are going to install from the source code, please check Section 2.2.

Pgpool-II community provides RPM packages for RHEL9/8/7 and the operating system which is compatible with RHEL. You can download package files from official Pgpool-II repository.

Pgpool-II official repository contains the following packages:

Table 2-1. Pgpool-II RPM Packages

pgpool-II-pgXXLibraries and binaries required to run Pgpool-II
pgpool-II-pgXX-extensionsThis package must be installed on all PostgreSQL servers to use online recovery functionality
pgpool-II-pgXX-debuginfoDebug symbols for debugging
pgpool-II-pgXX-debugsourceOnly for RHEL8/9. Debug symbols for debugging
pgpool-II-pgXX-extensions-debuginfoOnly for RHEL8/9. Debug symbols for debugging
pgpool-II-pgXX-develHeader files for developers

Pgpool-II needs PostgreSQL's library and extensions directory. Since the directory paths are different in the particular PostgreSQL versions, Pgpool-II provides separate packages for each PostgreSQL version. "XX" in the above package is a two-digit number representing the version of PostgreSQL. Choose Pgpool-II RPM corresponding to your PostgreSQL version. (For example, if you are using PostgreSQL 15, you need to install pgpool-II-pg15)

2.10.1. Before Installing

Since Pgpool-II related packages are also included in PostgreSQL YUM repository, if PostgreSQL repository package is already installed, add the "exclude" settings to /etc/yum.repos.d/pgdg-redhat-all.repo, so that Pgpool-II will not be installed from PostgreSQL YUM repository. If Pgpool-II and PostgreSQL are installed on separate servers, you can skip this section.

vi /etc/yum.repos.d/pgdg-redhat-all.repo

The following is a setting example of /etc/yum.repos.d/pgdg-redhat-all.repo.








2.10.2. Installing RPM

Here we install Pgpool-II using Pgpool-II official YUM repository.

The following commands assume that you are using Pgpool-II 4.4.x for PostgreSQL 15 on RHEL8. If you are using other versions, replace "pgXX" with your PostgreSQL version.

First, install the repository corresponding to your Pgpool-II version and distribution. For REHL7/9, see here.

dnf install https://www.pgpool.net/yum/rpms/4.4/redhat/rhel-8-x86_64/pgpool-II-release-4.4-1.noarch.rpm

Then, install Pgpool-II.

dnf install pgpool-II-pg15

To use online recovery feature, install pgpool-II-pg15-extensions on all PostgreSQL servers. Because pgpool-II-pgXX-extensions depends on pgpool-II-pgXX package, if Pgpool-II and PostgreSQL are installed on separate servers, pgpool-II-pgXX also need to be installed on PostgreSQL servers.

Note: pgpool-II-pgXX-extensions needs to be installed on the PostgreSQL servers. If Pgpool-II and PostgreSQL are installed on separate servers, it is not requried to install it on the servers where Pgpool-II are running.

dnf install pgpool-II-pg15-extensions pgpool-II-pg15

Optionally you can install debuginfo and devel packages for developers if necessary.

dnf install pgpool-II-pg15-debuginfo pgpool-II-pg15-devel

2.10.3. Configuration Pgpool-II

All the Pgpool-II configuration files are installed in /etc/pgpool-II. Please refer to Section 3.3 to see how to set up configuration files.

2.10.4. Starting/stopping Pgpool-II

On RHEL9/8/7, do this once, if set the automatic startup of Pgpool-II.

systemctl enable pgpool.service

After this, to start Pgpool-II, run the following command or restart the whole system. Please note that PostgreSQL servers must have been started before this.

systemctl start pgpool.service 

To stop Pgpool-II, do this once. Please note that Pgpool-II must be stopped before stopping PostgreSQL.

systemctl stop pgpool.service 

After this, you can stop PostgreSQL servers.