Assuming our database is located at /db/pgdata, follow all of these steps to enable and configure automatic and forced pgpool primary server migration:
- Copy the scripts from the pgpool_scripts directory of this book to the PostgreSQL cluster data directory.
- Execute this command as a root-level user to make them executable:
chmod a+x /db/pgdata/pgpool_*
- Execute the following at the command line as a root-capable user:
sudo sed -i "s/'DISALLOW/'ALLOW/" /etc/pgpool/pgpool.conf
- Execute these commands as a root-capable user to enable pgpool control operations, where pass is a password defined for pgpool administration:
mv /etc/pgpool/pcp.conf.sample /etc/pgpool/pcp.conf echo postgres:$(pg_md5 pass) >> /etc/pgpool/pcp.conf ...