<div dir="ltr">Hi,<div>when performing attach/detach node via pcp commnad , the actions are performed flawlessly!!!</div><div><div><br></div><div><div># psql -U postgres -h 192.168.15.59 -p 9999 -c 'show pool_nodes;'</div><div>Password for user postgres:</div><div> node_id |   hostname    | port | status | lb_weight |  role</div><div>---------+---------------+------+--------+-----------+---------</div><div> 0       | 192.168.15.55 | 5432 | 2      | 0.500000  | primary</div><div> 1       | 192.168.15.56 | 5432 | 2      | 0.500000  | standby</div><div>(2 rows)</div><div><br></div><div><div>[root@mgrdb-55 ~]# pcp_detach_node 10 192.168.15.59 9898 fabrix fabrix 0</div><div>[root@mgrdb-55 ~]# psql -U postgres -h 192.168.15.59 -p 9999 -c 'show pool_nodes;'</div><div>Password for user postgres:</div><div> node_id |   hostname    | port | status | lb_weight |  role</div><div>---------+---------------+------+--------+-----------+---------</div><div> 0       | 192.168.15.55 | 5432 | 3      | 0.500000  | standby</div><div> 1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary</div><div>(2 rows)</div><div><br></div><div><br></div></div></div></div><div>[root@mgrdb-55 ~]# pcp_attach_node 10 192.168.15.59 9898 fabrix fabrix 0<br></div><div><br></div><div>using these command works as expected with not pgpool connection problems!</div><div>using pgpool_adm has a connection problems ... as describe before!!</div><div><br></div><div><br></div><div>Please advice....</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 9:45 AM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you elaborate what "everything works great" actually means?<br>
Sharing the exact command lines done by pcp commands are ideal...<br>
<div class="HOEnZb"><div class="h5"><br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
> I have simulated the exact scenario with pcp commands (not pgpool_adm sql<br>
> commands) and everything works great!!<br>
> but I need to use the pgpool_adm command (via sql)......<br>
> any ideas how can I track the disconnection errors?<br>
><br>
> Thanks,<br>
> cohavisi<br>
><br>
> On Wed, Nov 4, 2015 at 1:44 AM, Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>> wrote:<br>
><br>
>> It's an expected behavior. pgpool-II disconnects sessions to client<br>
>> when failover occurs.<br>
>><br>
>> Best regards,<br>
>> --<br>
>> Tatsuo Ishii<br>
>> SRA OSS, Inc. Japan<br>
>> English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
>> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
>><br>
>> > Hi,<br>
>> > I have another issue regarding detach/attach node via pgpool_adm<br>
>> functions:<br>
>> > looks like everytime I detach the primary node (in order to trigger a<br>
>> > failover), the connection to the pgpool get lost:<br>
>> ><br>
>> ><br>
>> > [root@localhost ~]# psql -U postgres template1 -h 192.168.15.59 -p 9999<br>
>> > Password for user postgres:<br>
>> > psql (9.3.1)<br>
>> > Type "help" for help.<br>
>> ><br>
>> > template1=# show pool_nodes;<br>
>> >  node_id |   hostname    | port | status | lb_weight |  role<br>
>> > ---------+---------------+------+--------+-----------+---------<br>
>> >  0       | 192.168.15.55 | 5432 | 2      | 0.500000  | primary<br>
>> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | standby<br>
>> > (2 rows)<br>
>> ><br>
>> ><br>
>> > template1=#<br>
>> > template1=#<br>
>> > template1=#<br>
>> > template1=# select<br>
>> > pcp_detach_node(0,False,'192.168.15.59',500,9898,'usr','pass');<br>
>> >  pcp_detach_node<br>
>> > -----------------<br>
>> >  t<br>
>> > (1 row)<br>
>> ><br>
>> > template1=# show pool_nodes;<br>
>> > *The connection to the server was lost. Attempting reset:*<br>
>> > *Succeeded.*<br>
>> > template1=# show pool_nodes;<br>
>> >  node_id |   hostname    | port | status | lb_weight |  role<br>
>> > ---------+---------------+------+--------+-----------+---------<br>
>> >  0       | 192.168.15.55 | 5432 | 3      | 0.500000  | standby<br>
>> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
>> > (2 rows)<br>
>> ><br>
>> ><br>
>> > template1=# select<br>
>> pcp_attach_node(0,'192.168.15.59',500,9898,'usr','pass');<br>
>> > *The connection to the server was lost. Attempting reset: Succeeded.*<br>
>> > template1=# select<br>
>> pcp_attach_node(0,'192.168.15.59',500,9898,'usr','pass');<br>
>> >  pcp_attach_node<br>
>> > -----------------<br>
>> >  t<br>
>> > (1 row)<br>
>> ><br>
>> ><br>
>> ><br>
>> > template1=# show pool_nodes;<br>
>> >  node_id |   hostname    | port | status | lb_weight |  role<br>
>> > ---------+---------------+------+--------+-----------+---------<br>
>> >  0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby<br>
>> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
>> > (2 rows)<br>
>> ><br>
>> > template1=# show pool_nodes;<br>
>> >  node_id |   hostname    | port | status | lb_weight |  role<br>
>> > ---------+---------------+------+--------+-----------+---------<br>
>> >  0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby<br>
>> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
>> > (2 rows)<br>
>> ><br>
>> > template1=# show pool_nodes;<br>
>> >  node_id |   hostname    | port | status | lb_weight |  role<br>
>> > ---------+---------------+------+--------+-----------+---------<br>
>> >  0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby<br>
>> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
>> ><br>
>> ><br>
>> > template1=# show pool_nodes;<br>
>> >  node_id |   hostname    | port | status | lb_weight |  role<br>
>> > ---------+---------------+------+--------+-----------+---------<br>
>> >  0       | 192.168.15.55 | 5432 | 2      | 0.500000  | standby<br>
>> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
>> > (2 rows)<br>
>> ><br>
>> > template1=#<br>
>> ><br>
>> ><br>
>> > Please advise.....<br>
>> ><br>
>> > cohavisi<br>
>> ><br>
>> ><br>
>> > On Thu, Oct 29, 2015 at 1:50 PM, Shay Cohavi <<a href="mailto:cohavisi@gmail.com">cohavisi@gmail.com</a>> wrote:<br>
>> ><br>
>> >> Thanks!!!!<br>
>> >> I'm using postgres 9.3.1 !<br>
>> >><br>
>> >><br>
>> >> On Thu, Oct 29, 2015 at 8:58 AM, Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>><br>
>> >> wrote:<br>
>> >><br>
>> >>> >> *pcp_node_info*<br>
>> >>> >><br>
>> >>> >> template1=# select<br>
>> >>> pcp_node_info(0,'192.168.15.59',500,9898,'user','pass');<br>
>> >>> >> The connection to the server was lost. Attempting reset: Failed.<br>
>> >>> >> !><br>
>> >>> ><br>
>> >>> > Will look into this.<br>
>> >>><br>
>> >>> Assuming you are using PostgreSQL 9.4, I found some compiler warnings<br>
>> >>> with the source file. Please try attached patches.<br>
>> >>><br>
>> >>> Best regards,<br>
>> >>> --<br>
>> >>> Tatsuo Ishii<br>
>> >>> SRA OSS, Inc. Japan<br>
>> >>> English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
>> >>> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
>> >>><br>
>> >><br>
>> >><br>
>><br>
</div></div></blockquote></div><br></div>