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

Tatsuo Ishii ishii at postgresql.org
Fri Mar 6 11:11:38 JST 2015


It's best to ask EDB support regarding your questions because you are
using EDB's PPAS.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

From: Gurunadh Venkata <gurunadh.venkata at gmail.com>
Subject: [pgpool-general: 3492] Fwd: Reg Failover script in Pgpool
Date: Mon, 2 Mar 2015 11:40:51 +0530
Message-ID: <CAJAdScZj70sOpJ0q_OCoEfCFmMoTpkdcd8+XrSARiTzXc+ChCg at mail.gmail.com>

> 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
> %R'
> 
> Following is the failover script.
> 
> #!/bin/bash -x
> FALLING_NODE=$1         # %d
> OLDPRIMARY_NODE=$2      # %P
> NEW_PRIMARY=$3          # %H
> PGDATA=$4               # %R
> 
> if [ $FALLING_NODE = $OLDPRIMARY_NODE ]; then
>     if [ $UID -eq 0 ]
>     then
>         su enterprisedb -c "ssh -T enterprisedb@$NEW_PRIMARY touch
> $PGDATA/trigger"
>     else
>         ssh -T enterprisedb@$NEW_PRIMARY touch $PGDATA/trigger
>     fi
>     exit 0;
> fi;
> 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.
> 
>>From pgpool end
> 
> show pool_nodes;
> 
> o/p:
> 
> edb=# show pool_nodes;
>  node_id |  hostname  | port | status | lb_weight |  role
> ---------+------------+------+--------+-----------+---------
>  0       | 10.0.0.149 | 5444 | 3      | 0.500000  | standby
>  1       | 10.0.0.158 | 5444 | 2      | 0.500000  | standby
> (2 rows)
> 
> 
> Please help me in Fixing this Issue.Provide me the working failover
> script if any.
> 
> 
> Thanks for your time.
> 
> 
> 
> Thanks & Regards,
> G V Gurunadh.


More information about the pgpool-general mailing list