1. Pre-installation requirements
All pre-installation steps should be performed on all PostgreSQL nodes.
Network Communication
All three PostgreSQL nodes need to communicate with each other via TCP for WAL (write ahead of log).
row
Port
Purpose
1
5432
This port is used for PostgreSQL communication.
2
22
This SSH port will be used for Pgpool to invoke scripts on PostgreSQL nodes.
3
NFS?
All PostgreSQL nodes must have access to a common file share location to write and access archive logs. This port may vary depending on the chosen file sharing method
File Sharing
Each PostgreSQL node must have a unique shared location where it can write its archive logs and the other nodes can access them.
row
Folder Name
Purpose
1
/db/node0archive
node0 will write the archive log to this folder and the follower will read from it. this folder will be shared across node0, node1 and node2.
2
/db/node1archive
node1 will write the archive log to this folder and the follower will read from it. this folder will be shared across node0, node1 and node2.
3
/db/node2archive
node2 will write the archive log to this folder and the follower will read from it. this folder will be shared across node0, node1 and node2.
Remote Access
Each Pgpool node requires SSH access without providing a password to all PostgreSQL nodes. The Pgpool user should be trusted by the PostgreSQL nodes.
Configuring this trust relationship is not be covered by this example.
Database Folder Setup
Postgresql 10 will by default install into /var/lib/postgresql/10.x/main and /var/lib/postgresql/10.x/data. However, in this example all installations are directed to /db/ to reflect a common production practice where data files are not maintained on an operating system disk.
Was this helpful?