Tips for Installation

This chapter gathers random tips for installing Pgpool-II .

2.11.1. Firewalls

When Pgpool-II connects to other Pgpool-II servers or PostgreSQL servers, the target port must be accessible by enabling firewall management softwares.

First, allow to access port that Pgpool-II use. In the example below, let Pgpool-II listen port number be 9999, PCP listen port number be 9898, watchdog listen port number be 9000 and heartbeat listen port number be 9694. Notice that only heartbeat port uses UDP and others use TCP.

    firewall-cmd --permanent --zone=public --add-port=9999/tcp --add-port=9898/tcp --add-port=9000/tcp
    firewall-cmd --permanent --zone=public --add-port=9694/udp
    firewall-cmd --reload
   

Here is an example for CentOS/RHEL7 when access to PostgreSQL is required.

    firewall-cmd --permanent --zone=public --add-service=postgresql
    firewall-cmd --reload
   

"postgresql" is the service name assigned to PostgreSQL . The list of service names can be obtained by:

    firewall-cmd --get-services
   

Note that you can define your own service name in /usr/lib/firewalld/services/.

If PostgreSQL is listening on 11002 port, rather than the standard 5432 port, you can do:

    firewall-cmd --zone=public --remove-service=postgresql --permanent
    firewall-cmd --zone=public --add-port=11002/tcp --permanent
    firewall-cmd --reload