<div dir="ltr">On Mon, May 4, 2015 at 3:59 PM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></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="">> Hi Team,<br>
><br>
> Am using pgpool version 3.3.3 with load-balancing feature.<br>
><br>
> My question is, during month end, users are executing long running queries<br>
> via pgpool and those queries are running on Slave node(which is good).<br>
> Sometimes we<br>
> get request from same user to stop those queries, in such cases we cannot<br>
> 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's query. Then you can<br>
issue "select pg_cancel_backend(pid)" 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'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>