1# 2# pgpool configuration file sample 3# $Header: /cvsroot/pgpool/pgpool-II/pgpool.conf.sample,v 1.1.1.1 2006/09/08 03:36:04 t-ishii Exp $ 4 5# Host name or IP address to listen on: '*' for all, '' for no TCP/IP 6# connections 7listen_addresses = 'localhost' 8 9# Port number for pgpool 10port = 9999 11 12# Port number for pgpool communication manager 13pcp_port = 9898 14 15# Unix domain socket path. (The Debian package defaults to 16# /var/run/postgresql.) 17socket_dir = '/tmp' 18 19# Unix domain socket path for pgpool communication manager. 20# (Debian package default to /var/run/postgresql) 21pcp_socket_dir = '/tmp' 22 23# Unix domain socket path for the backend. Debian package default to /var/run/postgresql! 24backend_socket_dir = '/tmp' 25 26# pgpool communication manager timeout. 0 means no timeout, but strongly not recommended! 27pcp_timeout = 10 28 29# number of pre-forked child process 30num_init_children = 32 31 32# Number of connection pools allowed for a child process 33max_pool = 4 34 35# If idle for this many seconds, child exits. 0 means no timeout. 36child_life_time = 300 37 38# If idle for this many seconds, connection to PostgreSQL closes. 39# 0 means no timeout. 40connection_life_time = 0 41 42# If child_max_connections connections were received, child exits. 43# 0 means no exit. 44child_max_connections = 0 45 46# Logging directory 47logdir = '/tmp' 48 49# Replication mode 50#replication_mode = false 51 52# Set this to true if you want to avoid deadlock situations when 53# replication is enabled. There will, however, be a noticable performance 54# degration. A workaround is to set this to false and insert a /*STRICT*/ 55# comment at the beginning of the SQL command. 56#replication_strict = true 57 58# When replication_strict is set to false, there will be a chance for 59# deadlocks. Set this to nonzero (in milliseconds) to detect this 60# situation and resolve the deadlock by aborting current session. 61#replication_timeout = 5000 62 63# Load balancing mode, i.e., all SELECTs except in a transaction block 64# are load balanced. This is ignored if replication_mode is false. 65#load_balance_mode = false 66 67# if there's a data mismatch between master and secondary 68# start degenration to stop replication mode 69#replication_stop_on_mismatch = false 70 71# Semicolon separated list of queries to be issued at the end of a session 72reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT' 73 74# If true print time stamp on each log line. 75print_timestamp = true 76 77# If true, operate in master/slave mode. 78#master_slave_mode = false 79 80# If true, cache connection pool. 81connection_cache = true 82 83# Health check timeout. 0 means no timeout. 84health_check_timeout = 20 85 86# Health check period. 0 means no health check. 87health_check_period = 0 88 89# Health check user 90health_check_user = 'nobody' 91 92# If true, automatically lock table with INSERT statements to keep SERIAL 93# data consistency. An /*INSERT LOCK*/ comment has the same effect. A 94# /NO INSERT LOCK*/ comment disables the effect. 95insert_lock = false 96 97# If true, ignore leading white spaces of each query while pgpool judges 98# whether the query is a SELECT so that it can be load balanced. This 99# is useful for certain APIs such as DBI/DBD which is known to adding an 100# extra leading white space. 101ignore_leading_white_space = false 102 103# If true, print all statements to the log. Like the log_statement option 104# to PostgreSQL, this allows for observing queries without engaging in full 105# debugging. 106log_statement = true 107 108# if non 0, run in parallel query mode 109#parallel_mode = false 110 111# if non 0, use query cache 112#enable_query_cache = false 113 114#set pgpool2 hostname 115#pgpool2_hostname = '' 116 117# system DB info 118#system_db_hostname = 'localhost' 119#system_db_port = 5432 120#system_db_dbname = 'pgpool' 121#system_db_schema = 'pgpool_catalog' 122#system_db_user = 'pgpool' 123#system_db_password = '' 124 125# backend_hostname, backend_port, backend_weight 126# here are examples 127backend_hostname0 = 'localhost' 128backend_port0 = 5432 129backend_weight0 = 1 130#backend_hostname0 = 'host1' 131#backend_port0 = 5432 132#backend_weight0 = 1 133#backend_hostname1 = 'host2' 134#backend_port1 = 5433 135#backend_weight1 = 1 136