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