Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Jacob Kaplan-Moss March 17, 2010
file 45 lines (35 sloc) 1.19 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
# pgpool2 conf, failover edition (/etc/pgpool.conf).

# Listen on localhost 5432
listen_addresses = 'localhost'
port = 5432

# Don't use local auth; defer to the database instead.
enable_pool_hba = false

# Don't use any of pgpool's fancy features
replication_mode = false
load_balance_mode = false
master_slave_mode = false

# Backend info.
# Replace IPs with IPs of your backend

# Active backend
backend_hostname0 = '10.X.X.X'
backend_port0 = 5432

# Failover backend
backend_hostname1 = '10.X.X.X'
backend_port1 = 5432

# Pgpool's health check is widgy; we only want to fail over if the database
# actually is completely down.
health_check_period = 0
fail_over_on_backend_error = false

# Failover command
# Replace IP with the IP of the failver backend.
failover_command = 'ssh -i /var/lib/postgresql/.ssh/pgstandby.key postgres@10.X.X.X touch /etc/postgresql/8.4/main/trigger-end-recovery.5432'

# Connection pooling: 20 pre-forked child processes, 2 connections per process.
connection_cache = true
num_init_children = 20
max_pool = 2
child_life_time = 300

# Lifecycle control times
connection_life_time = 0
child_max_connections = 0
child_idle_limit = 0
authentication_timeout = 30
Something went wrong with that request. Please try again.