[pgpool-general: 3492] Fwd: Reg Failover script in Pgpool

Gurunadh Venkata gurunadh.venkata at gmail.com
Mon Mar 2 15:10:51 JST 2015

Hi all,

Can anyone please let me the failover_script which is Working fine in
pgpool.conf .What are all the other important parameters need to be
configured in pgpool.conf file to work the failover feature as expected.

Following is the failover script i am using.

DB version PPAS 9.4AS(EnterpriseDB)

pgpool   version 3.3.4

I have setup the load balancing and failover for Availability in pgpool. I
have used the Master-slave replication(stream mode) for replication.

The following is my failover_command ='/usr/local/etc/failover.sh %d %P %H

Following is the failover script.

#!/bin/bash -x
FALLING_NODE=$1         # %d
NEW_PRIMARY=$3          # %H
PGDATA=$4               # %R

    if [ $UID -eq 0 ]
        su enterprisedb -c "ssh -T enterprisedb@$NEW_PRIMARY touch
        ssh -T enterprisedb@$NEW_PRIMARY touch $PGDATA/trigger
    exit 0;
exit 0;

To check the  failover scenario i have stopped the master database
server.According to the script the present salve will take over the
role of master. But the same was not happening in my case.

More information about the pgpool-general mailing list