<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 &#39;show pool_nodes;&#39;</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 &#39;show pool_nodes;&#39;</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">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</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 &quot;everything works great&quot; 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>
&gt; I have simulated the exact scenario with pcp commands (not pgpool_adm sql<br>
&gt; commands) and everything works great!!<br>
&gt; but I need to use the pgpool_adm command (via sql)......<br>
&gt; any ideas how can I track the disconnection errors?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; cohavisi<br>
&gt;<br>
&gt; On Wed, Nov 4, 2015 at 1:44 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; It&#39;s an expected behavior. pgpool-II disconnects sessions to client<br>
&gt;&gt; when failover occurs.<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; 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>
&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt;<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt; I have another issue regarding detach/attach node via pgpool_adm<br>
&gt;&gt; functions:<br>
&gt;&gt; &gt; looks like everytime I detach the primary node (in order to trigger a<br>
&gt;&gt; &gt; failover), the connection to the pgpool get lost:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; [root@localhost ~]# psql -U postgres template1 -h 192.168.15.59 -p 9999<br>
&gt;&gt; &gt; Password for user postgres:<br>
&gt;&gt; &gt; psql (9.3.1)<br>
&gt;&gt; &gt; Type &quot;help&quot; for help.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; template1=# show pool_nodes;<br>
&gt;&gt; &gt;  node_id |   hostname    | port | status | lb_weight |  role<br>
&gt;&gt; &gt; ---------+---------------+------+--------+-----------+---------<br>
&gt;&gt; &gt;  0       | 192.168.15.55 | 5432 | 2      | 0.500000  | primary<br>
&gt;&gt; &gt;  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | standby<br>
&gt;&gt; &gt; (2 rows)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; template1=#<br>
&gt;&gt; &gt; template1=#<br>
&gt;&gt; &gt; template1=#<br>
&gt;&gt; &gt; template1=# select<br>
&gt;&gt; &gt; pcp_detach_node(0,False,&#39;192.168.15.59&#39;,500,9898,&#39;usr&#39;,&#39;pass&#39;);<br>
&gt;&gt; &gt;  pcp_detach_node<br>
&gt;&gt; &gt; -----------------<br>
&gt;&gt; &gt;  t<br>
&gt;&gt; &gt; (1 row)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; template1=# show pool_nodes;<br>
&gt;&gt; &gt; *The connection to the server was lost. Attempting reset:*<br>
&gt;&gt; &gt; *Succeeded.*<br>
&gt;&gt; &gt; template1=# show pool_nodes;<br>
&gt;&gt; &gt;  node_id |   hostname    | port | status | lb_weight |  role<br>
&gt;&gt; &gt; ---------+---------------+------+--------+-----------+---------<br>
&gt;&gt; &gt;  0       | 192.168.15.55 | 5432 | 3      | 0.500000  | standby<br>
&gt;&gt; &gt;  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
&gt;&gt; &gt; (2 rows)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; template1=# select<br>
&gt;&gt; pcp_attach_node(0,&#39;192.168.15.59&#39;,500,9898,&#39;usr&#39;,&#39;pass&#39;);<br>
&gt;&gt; &gt; *The connection to the server was lost. Attempting reset: Succeeded.*<br>
&gt;&gt; &gt; template1=# select<br>
&gt;&gt; pcp_attach_node(0,&#39;192.168.15.59&#39;,500,9898,&#39;usr&#39;,&#39;pass&#39;);<br>
&gt;&gt; &gt;  pcp_attach_node<br>
&gt;&gt; &gt; -----------------<br>
&gt;&gt; &gt;  t<br>
&gt;&gt; &gt; (1 row)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; template1=# show pool_nodes;<br>
&gt;&gt; &gt;  node_id |   hostname    | port | status | lb_weight |  role<br>
&gt;&gt; &gt; ---------+---------------+------+--------+-----------+---------<br>
&gt;&gt; &gt;  0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby<br>
&gt;&gt; &gt;  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
&gt;&gt; &gt; (2 rows)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; template1=# show pool_nodes;<br>
&gt;&gt; &gt;  node_id |   hostname    | port | status | lb_weight |  role<br>
&gt;&gt; &gt; ---------+---------------+------+--------+-----------+---------<br>
&gt;&gt; &gt;  0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby<br>
&gt;&gt; &gt;  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
&gt;&gt; &gt; (2 rows)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; template1=# show pool_nodes;<br>
&gt;&gt; &gt;  node_id |   hostname    | port | status | lb_weight |  role<br>
&gt;&gt; &gt; ---------+---------------+------+--------+-----------+---------<br>
&gt;&gt; &gt;  0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby<br>
&gt;&gt; &gt;  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; template1=# show pool_nodes;<br>
&gt;&gt; &gt;  node_id |   hostname    | port | status | lb_weight |  role<br>
&gt;&gt; &gt; ---------+---------------+------+--------+-----------+---------<br>
&gt;&gt; &gt;  0       | 192.168.15.55 | 5432 | 2      | 0.500000  | standby<br>
&gt;&gt; &gt;  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary<br>
&gt;&gt; &gt; (2 rows)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; template1=#<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please advise.....<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; cohavisi<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Thu, Oct 29, 2015 at 1:50 PM, Shay Cohavi &lt;<a href="mailto:cohavisi@gmail.com">cohavisi@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; Thanks!!!!<br>
&gt;&gt; &gt;&gt; I&#39;m using postgres 9.3.1 !<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Thu, Oct 29, 2015 at 8:58 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; *pcp_node_info*<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; template1=# select<br>
&gt;&gt; &gt;&gt;&gt; pcp_node_info(0,&#39;192.168.15.59&#39;,500,9898,&#39;user&#39;,&#39;pass&#39;);<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; The connection to the server was lost. Attempting reset: Failed.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; !&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; Will look into this.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Assuming you are using PostgreSQL 9.4, I found some compiler warnings<br>
&gt;&gt; &gt;&gt;&gt; with the source file. Please try attached patches.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Best regards,<br>
&gt;&gt; &gt;&gt;&gt; --<br>
&gt;&gt; &gt;&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; &gt;&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; &gt;&gt;&gt; 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>
&gt;&gt; &gt;&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt;<br>
</div></div></blockquote></div><br></div>