Re: [GENERAL] How to stop a query

2012-07-20 Thread Martin French
To: pgsql-general@postgresql.org, > Date: 19/07/2012 20:30> Subject: Re: [GENERAL] How to stop a query> Sent by: pgsql-general-ow...@postgresql.org> > Hi, > > Yes, I'm sure, it's work.> > if you execute query by another program (program java), you must u

Re: [GENERAL] How to stop a query

2012-07-19 Thread Scott Marlowe
On Thu, Jul 19, 2012 at 3:17 AM, younus wrote: > Hi, > > First : >ps -ef | grep postgres > and kill -9 (PID of your query) NEVER kill -9 a postgres process unless you've exhausted all other possibilities, as it forces a restart of all the other backends as well. A plain kill (no -9) is

Re: [GENERAL] How to stop a query

2012-07-19 Thread Younus
Hi Scott, thank you for your comment 2012/7/19 Scott Marlowe > On Thu, Jul 19, 2012 at 3:17 AM, younus wrote: > > Hi, > > > > First : > >ps -ef | grep postgres > > and kill -9 (PID of your query) > > NEVER kill -9 a postgres process unless you've exhausted all other > possibilities,

Re: [GENERAL] How to stop a query

2012-07-19 Thread younus
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_ad

Re: [GENERAL] How to stop a query

2012-07-19 Thread Atri Sharma
On Thu, Jul 19, 2012 at 2:47 PM, younus wrote: > 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!=''; > > and > > SELECT pg_cancel_backend(procpi

Re: [GENERAL] How to stop a query

2012-07-19 Thread younus
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!=''; and SELECT pg_cancel_backend(procpid); younus, -- View this message in context: http://postgresql.

Re: [GENERAL] How to stop a query

2009-09-03 Thread Pavel Stehule
hello 2009/9/4 A B : > Hi. > How can I abort a query that I see is listed in > > select * from pg_stat_activity; > look on pg_cancel_backend function http://www.postgresql.org/docs/8.2/static/functions-admin.html regards Pavel Stehule > -- > Sent via pgsql-general mailing list (pgsql-general@p

Re: [GENERAL] How to stop a query

2009-09-03 Thread Guillaume Lelarge
Le vendredi 4 septembre 2009 à 07:37:20, A B a écrit : > Hi. > How can I abort a query that I see is listed in > > select * from pg_stat_activity; You have to do: SELECT pg_cancel_backend(pid of the postgres process); -- Guillaume. http://www.postgresqlfr.org http://dalibo.com -- Sent vi

[GENERAL] How to stop a query

2009-09-03 Thread A B
Hi. How can I abort a query that I see is listed in select * from pg_stat_activity; -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general