No subject


Fri Jan 30 20:15:43 JST 2015


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.

--f46d0435c034864b3f05104814f3
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi all,<div><br></div><div><br></div><div>Can anyone pleas=
e 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 fi=
le to work the failover feature as expected.<div><div class=3D"gmail_signat=
ure"><div dir=3D"ltr"><br></div><div>Following is the failover script i am =
using.</div><div><br></div><div>DB version PPAS 9.4AS(EnterpriseDB)=C2=A0</=
div><div><br></div><div>pgpool =C2=A0 version 3.3.4=C2=A0</div><div><br></d=
iv></div></div><div class=3D"gmail_quote"><div dir=3D"ltr"><div><div dir=3D=
"ltr">I have setup the load balancing and failover for Availability in pgpo=
ol. I have used the Master-slave replication(stream mode) for replication.<=
/div><div dir=3D"ltr"><br></div><div dir=3D"ltr">The following is my failov=
er_command =3D&#39;<span style=3D"color:rgb(0,0,0);white-space:pre-wrap">/u=
sr/local/etc/failover.sh %d %P %H %R</span>&#39;</div><div dir=3D"ltr"><br>=
</div><div dir=3D"ltr">Following is the failover script.</div><div dir=3D"l=
tr"><br></div><div dir=3D"ltr"><pre style=3D"white-space:pre-wrap;word-wrap=
:break-word"><font color=3D"#000000">#!/bin/bash -x
FALLING_NODE=3D$1         # %d
OLDPRIMARY_NODE=3D$2      # %P
NEW_PRIMARY=3D$3          # %H
PGDATA=3D$4               # %R

if [ $FALLING_NODE =3D $OLDPRIMARY_NODE ]; then
    if [ $UID -eq 0 ]
    then
        su enterprisedb -c &quot;ssh -T enterprisedb@$NEW_PRIMARY touch $PG=
DATA/trigger&quot;
    else
        ssh -T enterprisedb@$NEW_PRIMARY touch $PGDATA/trigger
    fi
    exit 0;
fi;
exit 0;<br></font></pre><pre style=3D"white-space:pre-wrap;word-wrap:break-=
word"><br></pre><pre style=3D"white-space:pre-wrap;word-wrap:break-word">To=
 check the  failover scenario i have stopped the master database server.Acc=
ording to the script the present salve will take over the role of master. B=
ut the same was not happening in my case.</pre><pre style=3D"white-space:pr=
e-wrap;word-wrap:break-word">From pgpool end</pre><pre style=3D"white-space=
:pre-wrap;word-wrap:break-word">show pool_nodes;</pre><pre style=3D"white-s=
pace:pre-wrap;word-wrap:break-word">o/p:</pre><pre style=3D"word-wrap:break=
-word"><span style=3D"white-space:pre-wrap">edb=3D# 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)</span></pre><pre style=3D"word-wrap:break-word"><br></pre><pre sty=
le=3D"word-wrap:break-word">Please help me in Fixing this Issue.Provide me =
the working failover script if any.</pre><pre style=3D"word-wrap:break-word=
"><br></pre><pre style=3D"word-wrap:break-word">Thanks for your time.</pre>=
<pre style=3D"white-space:pre-wrap;word-wrap:break-word"><br></pre><br>Than=
ks &amp; Regards,<br>G V Gurunadh.</div></div>
</div></div></div><img width=3D"1" height=3D"1" src=3D"http://s.bl-1.com/hJ=
QGXpF.gif"></div>

--f46d0435c034864b3f05104814f3--


More information about the pgpool-general mailing list