**recovery.conf** : A config file used by postgres slave for streaming replication process.
-**failover.sh** : This script will be executed automatically when a pgpool's backend node (postgres node) fall down. It'll switch the standby node (slave) to master (new master).
+**failover.sh** : This script will be executed automatically when a pgpool's backend node (postgres node) fails down. It'll switch the standby node (slave) to master (new master).
**online-recovery.sh** : This is the bash script which you'll execute manually in order to :
* Reboot, sync and reattach slave node to pgpool if it fails.
health_check_period = 30
health_check_user = 'postgres'
health_check_password = 'postgrespass'
+ # - Special commands -
+ follow_master_command = 'echo %M > /tmp/postgres_master'
# Failover command
failover_command = '/path/to/failover.sh %d %H %P /tmp/trigger_file'
After starting pgpool, try to test this two scenarios :
-**1. When a slave fall down** :
+**1. When a slave fails down** :
Open pgpool log file 'tail -f /var/log/pgpool2/pgpool.log'.
# ./online-recovery.sh
-**2. When a master fall down** :
+**2. When a master fails down** :
Idem, open pgpool log file.