Re: How to stop a query - Mailing list pgsql-general

From younus
Subject Re: How to stop a query
Date
Msg-id 1342715157804-5717297.post@n5.nabble.com
Whole thread Raw
In response to Re: How to stop a query  (Atri Sharma <atri.jiit@gmail.com>)
Responses Re: How to stop a query  ("Martin French" <Martin.French@romaxtech.com>)
List pgsql-general
Hi,

Yes, I'm sure, it's work.

if you execute query by another program (program java), you must use the
first solution [ps -ef | grep postgres and  kill -9 (PID of your query)].

if you use pgsql terminal and you're connecting with postgres you can use
select procpid, datname, usename, client_addr,  current_query from
pg_stat_activity where current_query!='<IDLE>';
SELECT pg_cancel_backend (procpid);




Younus.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-stop-a-query-tp1924086p5717297.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: How to stop a query
Next
From: Younus
Date:
Subject: Re: How to stop a query