<div dir="ltr">On Mon, May 4, 2015 at 3:59 PM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt; Hi Team,<br>
&gt;<br>
&gt; Am using pgpool version 3.3.3 with load-balancing feature.<br>
&gt;<br>
&gt; My question is, during month end, users are executing long running queries<br>
&gt; via pgpool and those queries are running on Slave node(which is good).<br>
&gt; Sometimes we<br>
&gt; get request from same user to stop those queries, in such cases we cannot<br>
&gt; stop those queries using pg_cancel_backend()<br>
<br>
</span>Why you cannot use pg_cancel_backend()? You can directly connect to<br>
the PostgreSQL backend and by using pg_stat_activity to get the<br>
process id of the backend which runs the user&#39;s query. Then you can<br>
issue &quot;select pg_cancel_backend(pid)&quot; to cancel the query.<br>
<span class=""><br></span></blockquote><div>Thank you for quick response.</div><div><br></div><div>Ah.. we were trying to cancel query via pgpool, above mentioned method we didn&#39;t try, </div><div>seems its a clean way to kill the long running queries. This answers all my queries.</div><div><br></div><div>--Raghav</div><div><br></div></div><div class="gmail_signature"><div dir="ltr"><div><div></div></div></div></div>
</div></div>