#

## pgpool Setting

### Summary

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

### Feature

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.

### Table of Contents

- Connections
- Backends
- PCP
- Logging
- Replication
- Health Check
- Online Recovery
- System Database
- Others

### Connections

Parameter | Detail
--- | ---
Specifies the addresses to listen on for TCP/IP connections 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.
The port number where pgpool is running on port (integer) | The port number where pgpool is running on. Default value is 9999.
The socket directory pgpool could connect socket_dir (string) | The directory of unix domain socket for PostgreSQL server. Default value is '/tmp'.
Number of pgpool process initially forked num_init_children (integer) | Number of pgpool process initially forked. Default value is 32.
Number of connection pools each pgpool server process are keeping 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.
Life of a idle child process in seconds 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.
Life time for each idle connection in seconds connection_life_time (integer) | Life time for each idle connection in seconds. 0 means the life time is forever. The default value is 0.
If child_max_connections connections were received, child exits 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 connection_cache | If true, cache connections to PostgreSQL. Default value is true.
Pgpool2 server name where running on pgpool2_hostname (string) | The host name that pgpool2 runs is specified.

### Backends

Parameter | Detail |
The socket directory PostgreSQL could connect backend_socket_dir (string) | The directory of unix domain socket for PostgreSQL server. Default value is '/tmp'.
The real PostgreSQL server name pgpool could connect backend_hostname (string) | The host name that PostgreSQL runs is specified.
The port number where real PostgreSQL server is running on backend_port (integer) | It is a port number that postmaster is running.
Load balance weight when pgpool is running in the state of load balance mode 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
--- | ---
The port number where pcp is running on pcp_port (integer) | It is a port number to connect it with PCP. Default is 9898.
The socket directory pcp could connect pcp_socket_dir (string) | The directory of unix domain socket for PCP. Default value is '/tmp'.
When there is no response in this time from client, it disconnect and stop pcp_timeout (integer) | The time-out of the PCP command is set. The connection disconnect when there will not be response in this time.

### Logging

Parameter | Detail
--- | ---
The directory name to store pgpool's log files logdir (string) | The directory name to store pgpool's log files. Currently only a file named pgpool.pid(has pgpool's process id) is stored. The default value for logdir is '/tmp'.
If true timestamp is added to each log line print_timestamp | If true timestamp is added to each log line. The default value is true.
If true, print all statements to the log log_statement | 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. The default value is false. log_connections | If true, incoming connections will be printed to the log.
If true, client's hostname will be shown in ps status and in a connection log if log_connections is true log_hostname | 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.

### Replication

Parameter | Detail
--- | ---
Set this true if you are going to use replication functionality replication_mode | 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 replication_strict | 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 replication_stop_on_mismatch | Stop replication mode on data mismatch between master and secondary. Default is false.
Semicolon separated SQL commands to be issued at the end of session reset_query_list (string) | SQL command to initialize the connection when the session ends is delimited by ";".

### Health Check

Parameter | Detail
--- | ---
Pgpool does "health check" periodically to detect PostgreSQL servers down, network communication problems or as such 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.
Specifies the interval for next health checking. 0 means no health checking 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).
PostgreSQL user name for the health checking health_check_user (string) | PostgreSQL user name for the health checking.

### Online Recovery

Parameter | Detail
--- | ---
PostgreSQL user name for online recovery recovery_user (string) | A PostgreSQL user name to be used during online recovery process.
PostgreSQL user password for online recovery recovery_password (string) | "recovery_user"'s password to be used during online recovery process.
Recovery command to be excuted on the first stage 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 command to be excuted on the second stage 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
Number of seconds to wait for online recovery to complete. 0 means no wait 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
--- | ---
The server name system database running on system_db_hostname (string) | The host name that system DB is operating is specified. It connects with Unix domain socket when not specifying it.
The port number system database could connect system_db_port (integer) | The port number to connect system DB is specified.
The database name of system database system_db_dbname (string) | The data base name of system DB is specified.
The schema name of system database system_db_schema (string) | The schema name of system DB is specified.
The username when connection system database system_db_user (string) | The username connected with system DB is specified.
The password of system database who connects system database system_db_password (string) | The password connected with system DB is specified.

### Others

Parameter | Detail
--- | ---
Perform load balancing for SELECT load_balance_mode | Perform load balancing for SELECT. Default is false.
Run in master/slave mode master_slave_mode | 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 insert_lock | 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: INSERT INTO .... to: BEGIN; LOCK TABLE ... INSERT INTO ... COMMIT; 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 ignore_leading_white_space | 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.
Run in parallel mode parallel_mode | If true, pgpool runs in parallel mode. You must define partitioning rules to use parallel mode.
Perform query cache enable_query_cache | If true, allow pgpool to cache SELECT query results.
Use host-based authentication (HBA)', enable_pool_hba | If true, incoming clients are authenticated based on the configuration written in pool_hba.conf.