If all nodes are up and running we can already run our first operations on the cluster. In our example we will simply connect to pgpool and create a new database. createdb
is a command-line tool serving as abstraction for the CREATE DATABASE
command, which can be replicated by pgpool nicely. In our example we simply create a database called xy
to see if replication works:
$ createdb xy -p 9999
To see if the command has been replicated as expected, we suggest connecting to both databases and seeing if the new DB is present or not. In our example everything has been working as expected:
$ psql xy -p 5433 -c "SELECT 1 AS x" x --- 1 (1 row)
Doing this basic check is highly recommended to make sure that nothing has been forgotten and everything has been configured properly.
One more thing, which can be highly beneficial when it comes to checking a running setup, is pcp_pool_status
. It will extract information about the current setup and show information about configuration parameters currently in use.
The syntax of this command is basically the same as for all pcp_*
commands we have seen so far:
$ pcp_pool_status 5 localhost 9898 hs hs name : listen_addresses value: localhost desc : host name(s) or IP address(es) to listen to name : port value: 9999 desc : pgpool accepting port number ...
In addition to that we suggest performing the usual checks such as checking for open ports and properly running processes. These checks should reveal if anything of importance has been forgotten during the configuration.
3.129.211.166