pgpool Setting


The content of pgpool.conf that is the configuration file of pgpool set can be displayed and be changed.


Please input the value that wants to change and push the update button.

Addition of A backend host

Please push the add button when you want to add a new back end host.
It inputs in back end host's item and a new input column can be done, and input information on a new back end host there, please.
Please push the update button when input ends.

Deletion of backend host

Please push the delete button at the right of the host setting when you want to delete the back end host who has registered.


Parameter Detail

listen_addresses (string)
Specifies the addresses to listen on for TCP/IP connections. Set to '*' for all configured IP interfaces, '' for no TCP/IP connections, or else to a specific IP address or host name. The default is 'localhost'. Note that connections via UNIX domain sockets are always allowed.

port (integer)
The port number where pgpool is running on. Default value is 9999.

socket_dir (string)
The directory of unix domain socket for PostgreSQL server. Default value is '/tmp'.

num_init_children (integer)
Number of pgpool process initially forked. Default value is 32.

max_pool (integer)
Number of connection pools each pgpool server process are keeping. pgpool will make a new connection if there's no user name and database name pair yet. Thus it is recommended that max_pool exceeds the number of such that possible pairs. If it exceeds, the oldest connection is discarded and the new connection uses the slot. The default value is 4.

child_life_time (integer)
Life of a idle child process in seconds. This will prevent unwanted memory leaks or other problems. Default is 300. Set it to 0 disables this feature.

connection_life_time (integer)
Life time for each idle connection in seconds. 0 means the life time is forever. The default value is 0.

child_max_connections (integer)
If child_max_connections connections were received, child exits. 0 means no exit. The default value is 0.

If true, cache connections to PostgreSQL. Default value is true.

pgpool2_hostname (string)
The host name that pgpool2 runs is specified.


Parameter Detail

backend_socket_dir (string)
The directory of unix domain socket for PostgreSQL server. Default value is '/tmp'.

backend_hostname (string)
The host name that PostgreSQL runs is specified.

backend_port (integer)
It is a port number that postmaster is running.

backend_weight (integer)
The weight at the load balance mode is set by the value from 0 to 1. Relative weight is calculated and distributed from the value specified with all the back end servers.

PCP (pgpool Control Port)

Parameter Detail

pcp_port (integer)
It is a port number to connect it with PCP. Default is 9898.

pcp_socket_dir (string)
The directory of unix domain socket for PCP. Default value is '/tmp'.

pcp_timeout (integer)
The time-out of the PCP command is set. The connection disconnect when there will not be response in this time.


Parameter Detail

logdir (string)
The directory name to store pgpool's log files. Currently only a file named pgpool's process id) is stored. The default value for logdir is '/tmp'.

If true timestamp is added to each log line. The default value is true.

If true, print all statements to the log. Like the log_statement option to PostgreSQL, this allows for observing queries without engaging in full debugging. The default value is false.

If true, incoming connections will be printed to the log.

If true, incoming client's hostname will be printed in the "ps" command result. Also, if log_connections is enabled, hostname will be printed with a connection log. Be aware that hostname lookup adds some overhead, and may slow down pgpool-II.


Parameter Detail

Set this true if you are going to use replication functionality. Default is false.

If true, pgpool will wait for the completion of the master query before sending a query to the secondary server. This is the safest and default operating mode for pgpool. Default is true.

Stop replication mode on data mismatch between master and secondary. Default is false.

reset_query_list (string)
SQL command to initialize the connection when the session ends is delimited by ";".

Health Check

Parameter Detail

health_check_timeout (integer)
pgpool does "health check" periodically to detect PostgreSQL servers down, network communication problems or as such. If something is going wrong, pgpool will automatically run into fail over or degeneration mode.

health_check_period (integer)
Specifies the interval for next health checking. 0 means no health checking. The default is 0(i.e. no health checking).

health_check_user (string)
PostgreSQL user name for the health checking.

Online Recovery

Parameter Detail

recovery_user (string)
A PostgreSQL user name to be used during online recovery process.

recovery_password (string)
"recovery_user"'s password to be used during online recovery process.

recovery_1st_stage_command (string)
Specifies a script name to be executed for the first stage of an online recovery process. The script needs to be placed in master node's database cluster ($PGDATA)

recovery_2nd_stage_command (string)
Specifies a script name to be executed for the second stage of an online recovery process. The script needs to be placed in master node's database cluster ($PGDATA

recovery_timeout (integer)
Number of seconds to wait for online recovery to complete. Note that 0 means NO WAIT; not no timeout.

System Database

Parameter Detail

system_db_hostname (string)
The host name that system DB is operating is specified. It connects with Unix domain socket when not specifying it.

system_db_port (integer)
The port number to connect system DB is specified.

system_db_dbname (string)
The data base name of system DB is specified.

system_db_schema (string)
The schema name of system DB is specified.

system_db_user (string)
The username connected with system DB is specified.

system_db_password (string)
The password connected with system DB is specified.


Parameter Detail

Perform load balancing for SELECT. Default is false.

Run in master/slave mode. See 14 for more details. Default value is false. This mode is not compatible with replication_mode.

If you replicate a table having SERIAL data type column, sometimes the serial value does not match between servers. You can avoid the problem by using a table lock (with a performance penalty due to less currency in transactions). For this you need to rewrite you query:




This is painfull. If you turn on insert_lock, pgpool will automatically do the rewriting for you.

If true, ignore leading white spaces of each query while pgpool judges if the query is a SELECT so that it can be load balanced. This is usefull for certain APIs such as DBI/DBD which is know as adding an extra leading white space.

If true, pgpool runs in parallel mode. You must define partitioning rules to use parallel mode.

If true, allow pgpool to cache SELECT query results.

If true, incoming clients are authenticated based on the configuration written in pool_hba.conf.