3 ssh postgres@10.200.1.60 PCPPASSFILE=/etc/pgpool-II/.pcppass pcp_watchdog_info --no-password | tee /dev/stderr | grep DEAD | cut -d' ' -f2 | while read host ; do
4 ssh -F ssh_config $host systemctl start pgpool
7 replication_ok=`psql -h 10.200.1.61 -t -A -c 'SELECT count(*) from pg_stat_replication' postgres postgres`
8 if [ $replication_ok != 1 ] ; then
9 echo FIXME online-recovery?
13 psql -h 10.200.1.60 -p 9999 -c 'show pool_nodes' postgres postgres | grep down | awk '{ print $1 }' | while read node_id ; do
14 ssh postgres@10.200.1.60 PCPPASSFILE=/etc/pgpool-II/.pcppass pcp_attach_node --node-id $node_id --no-password