<div dir="auto"><div dir="ltr">Hi,<div><br></div><div>First of all, you are asking questions about propriety</div><div>packages. Please ask questions regarding propriety products to the<br>vendor  <br></div><div> - Sorry for that, issue is same for community pgpool</div><div><br></div><div>As other people already pointed out, there&#39;s an option to stop pgpool<br>without waiting for clients disconnected to pgpool. Probably you can<br>set the option to tweak systemectl related files. The way to do it<br>depends how the package is created, which we don&#39;t know. If you are<br>not sure, ask the vendor. </div><div> - I tried this option to stop and start pgpool but this affects load balancing. We I use systemctl to stop and start pgpool, then write statements are sent to primary only but when I use stopping and starting with &quot;pgpool stop -mf&quot; and &quot;pgpool -f pgpool.conf -D&quot; respectively, pgpool doesn&#39;t recognize write and sends to standby, this is resolved only after restarting the application</div><div><br></div><div>Because systemd kill -9 pgpool to not give a chance to remove the socket files.  <br></div><div>- This should not be the case right, because in production there will be connections all the time and after using systemctl these files should be removed </div><div dir="auto"><br></div><div dir="auto">Thanks and Regards,</div><div dir="auto">Nikhil</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 17, 2020 at 3:49 AM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank" rel="noreferrer">ishii@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">First of all, you are asking questions about propriety<br>
packages. Please ask questions regarding propriety products to the<br>
vendor.<br>
<br>
&gt; Hi Team,<br>
&gt; <br>
&gt; I am testing pgpool for my workload.We have three nodes of pgpool used as a<br>
&gt; load balancer and connection pooler across three nodes of database servers.<br>
&gt; <br>
&gt; All application connections to the database are through the pgpool. Without<br>
&gt; stopping the application, if we want to stop the pgpool using &quot;systemctl<br>
&gt; stop edb-pgpool-4.0&quot; then it takes a long time because connections are<br>
&gt; still coming to the pgpool. Pgpool is stopped only after no new connections<br>
&gt; appear + existing connections are terminated.<br>
&gt; <br>
&gt; Even after Pgpool is stopped, I can see that files(.s.PGSQL.9898 and<br>
&gt; .s.PGSQL.9999) under socket_dir which in our case is /tmp are not removed.<br>
&gt; This does not allow the pgpool to start using  &quot;systemctl start<br>
&gt; edb-pgpool-4.0&quot;. We have to manually remove the files under /tmp and then<br>
&gt; start pgpool.<br>
&gt; <br>
&gt; I have two questions:<br>
&gt; 1. Before stopping pgpool, how can we prevent new connections from coming<br>
&gt; into pgpool without stopping the application and terminate the<br>
&gt; existing connections so that the stop command does not wait.<br>
<br>
As other people already pointed out, there&#39;s an option to stop pgpool<br>
without waiting for clients disconnected to pgpool. Probably you can<br>
set the option to tweak systemectl related files. The way to do it<br>
depends how the package is created, which we don&#39;t know. If you are<br>
not sure, ask the vendor.<br>
<br>
&gt; 2. After stopping pgpool, why are files under /tmp not removed?<br>
<br>
Because systemd kill -9 pgpool to not give a chance to remove the<br>
socket files.<br>
<br>
&gt; PS:Files are removed from /tmp if there are no connections via pgpool(this<br>
&gt; will never be the case in production environment)<br>
<br>
Because if there&#39;s no connection from clients, pgpool can remove the<br>
socket files before systemd kills pgpool.<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 noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
</blockquote></div></div>