<div dir="ltr">Hi,<div>I have another issue regarding detach/attach node via pgpool_adm functions:</div><div>looks like everytime I detach the primary node (in order to trigger a failover), the connection to the pgpool get lost:</div><div><br></div><div><br></div><div><div>[root@localhost ~]# psql -U postgres template1 -h 192.168.15.59 -p 9999</div><div>Password for user postgres:</div><div>psql (9.3.1)</div><div>Type &quot;help&quot; for help.</div><div><br></div><div>template1=# show pool_nodes;</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><div><br></div><div><br></div><div><div>template1=#</div><div>template1=#</div><div>template1=#</div><div>template1=# select pcp_detach_node(0,False,&#39;192.168.15.59&#39;,500,9898,&#39;usr&#39;,&#39;pass&#39;);</div><div> pcp_detach_node</div><div>-----------------</div><div> t</div><div>(1 row)</div><div><br></div><div><div>template1=# show pool_nodes;</div><div><b>The connection to the server was lost. Attempting reset:</b></div><div><b>Succeeded.</b></div></div><div><div>template1=# show pool_nodes;</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><div><br></div><div><br></div><div>template1=# select pcp_attach_node(0,&#39;192.168.15.59&#39;,500,9898,&#39;usr&#39;,&#39;pass&#39;);</div><div><b><font style="background-color:rgb(255,255,0)" color="#ff0000">The connection to the server was lost. Attempting reset: Succeeded.</font></b></div><div>template1=# select pcp_attach_node(0,&#39;192.168.15.59&#39;,500,9898,&#39;usr&#39;,&#39;pass&#39;);</div><div> pcp_attach_node</div><div>-----------------</div><div> t</div><div>(1 row)</div><div><br></div><div><br></div><div><br></div><div><div>template1=# show pool_nodes;</div><div> node_id |   hostname    | port | status | lb_weight |  role</div><div>---------+---------------+------+--------+-----------+---------</div><div> 0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby</div><div> 1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary</div><div>(2 rows)</div><div><br></div><div>template1=# show pool_nodes;</div><div> node_id |   hostname    | port | status | lb_weight |  role</div><div>---------+---------------+------+--------+-----------+---------</div><div> 0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby</div><div> 1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary</div><div>(2 rows)</div><div><br></div><div>template1=# show pool_nodes;</div><div> node_id |   hostname    | port | status | lb_weight |  role</div><div>---------+---------------+------+--------+-----------+---------</div><div> 0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby</div><div> 1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary</div></div></div><div><br></div><div><font color="#6aa84f"><br></font></div><div><div><font color="#6aa84f">template1=# show pool_nodes;</font></div><div><font color="#6aa84f"> node_id |   hostname    | port | status | lb_weight |  role</font></div><div><font color="#6aa84f">---------+---------------+------+--------+-----------+---------</font></div><div><font color="#6aa84f"> 0       | 192.168.15.55 | 5432 | 2      | 0.500000  | standby</font></div><div><font color="#6aa84f"> 1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary</font></div><div><font color="#6aa84f">(2 rows)</font></div><div><font color="#6aa84f"><br></font></div><div><font color="#6aa84f">template1=#</font></div></div><div><br></div><div><br></div><div>Please advise.....</div><div><br></div><div>cohavisi</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 29, 2015 at 1:50 PM, Shay Cohavi <span dir="ltr">&lt;<a href="mailto:cohavisi@gmail.com" target="_blank">cohavisi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks!!!!<div>I&#39;m using postgres 9.3.1 !</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 29, 2015 at 8:58 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"><span>&gt;&gt; *pcp_node_info*<br>
&gt;&gt;<br>
&gt;&gt; template1=# select pcp_node_info(0,&#39;192.168.15.59&#39;,500,9898,&#39;user&#39;,&#39;pass&#39;);<br>
&gt;&gt; The connection to the server was lost. Attempting reset: Failed.<br>
&gt;&gt; !&gt;<br>
&gt;<br>
&gt; Will look into this.<br>
<br>
</span>Assuming you are using PostgreSQL 9.4, I found some compiler warnings<br>
with the source file. Please try attached patches.<br>
<div><div><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>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>