Re: How to stop a query

From: younus <younus(dot)essahli(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to stop a query
Date: 2012-07-19 09:17:59
Message-ID: 1342689479381-5717227.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

First :
ps -ef | grep postgres
and kill -9 (PID of your query)

Sec :
select procpid, datname, usename, client_addr, current_query from
pg_stat_activity where current_query!='<IDLE>';

and

SELECT pg_cancel_backend(procpid);

younus,

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Law 2012-07-19 09:33:01 Re: main log encoding problem
Previous Message Alban Hertroys 2012-07-19 09:01:49 Re: [GENERAL] main log encoding problem