-
Notifications
You must be signed in to change notification settings - Fork 10
PgPool II Configuration
Ricardo Amendoeira edited this page Sep 10, 2015
·
3 revisions
-
Open the file
/etc/pgpool-II/pool_hba.conf
and configure it just like you did in this section. -
Now open
/etc/pgpool-II/pgpool.conf
and change the following settings to these values:
(You can check what all the settings are here)
backend_hostname0 = '192.168.1.1'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/var/lib/postgresql/9.2/main/'
backend_flag0 = 'ALLOW_TO_FAILOVER'
Note: you need the above 5 lines for each of the PostgreSQL machines, so go ahead and repeat them for each missing machine. You have to change the number at the end of each setting name. So, for the second machine you can have backend_hostname1 and so on.
master_slave_mode = on
master_slave_sub_mode = 'stream'
-
port = 5432
- Use the standard PostgreSQL port load_balance_mode = on
-
health_check_period = 10
- in seconds, change this if you want different delays before initiating a PostgreSQL failover -
health_check_timeout = 5
- in seconds, should be smaller than the period use_watchdog = on
-
delegate_IP = 192.168.1.111
- This is the virtual IP, you must choose one that isn't being used -
wd_hostname = '192.168.1.100'
- This is the IP of this PgPool II server Remember that this setting must be different for each PgPool server, they point to each other wd_port = 9000
if_up_cmd = 'ifconfig eth0:111 inet $_IP_$ netmask 255.255.255.0'
if_down_cmd = 'ifconfig eth0:111 down'
wd_interval = 3
other_pgpool_hostname0 = '192.168.1.101'
other_pgpool_port0 = 5432
other_wd_port = 9000
- `white_function_list = 'pg_last_xlog_replay_location'` - `black_function_list = ''` > Since PgPool doesn't know if functions in your database write to the database or not, you have to set either a white list or a black list. [**They can't both be non-empty**](http://www.pgpool.net/docs/latest/pgpool-en.html#BLACK_FUNCTION_LIST)
- Home
- Overview
- Requirements
- Setup
- Summary and Quick Start
- Database (PostgreSQL) 1. PostgreSQL Installation 2. Configuring the Master 3. Configuring the Slaves 4. Testing Replication 5. Manual Failover
- Load Balancing (PgPool II) 1. PgPool II Installation 2. Configuration 3. Managing and Testing
- Automatic Failover 1. Setting it up 2. Testing
- Troubleshooting
- References