Re: How to stop a query

Поиск
Список
Период
Сортировка
Искать
От
Martin French
Тема
Re: How to stop a query
Дата
Msg-id
OF2B60335A.61899551-ON80257A41.0025970A-80257A41.00265D27@LocalDomain
Ответ на
Список
Дерево обсуждения
How to stop a query A B <gentosaker@gmail.com>
Re: How to stop a query Pavel Stehule <pavel.stehule@gmail.com>
Re: How to stop a query younus <younus.essahli@gmail.com>
Re: How to stop a query Atri Sharma <atri.jiit@gmail.com>
Re: How to stop a query younus <younus.essahli@gmail.com>
Re: How to stop a query "Martin French" <Martin.French@romaxtech.com>
autovaccum task got cancelled Gary Fu <gfu@sigmaspace.com>
Re: autovaccum task got cancelled bricklen <bricklen@gmail.com>
Re: autovaccum task got cancelled Sergey Konoplev <gray.ru@gmail.com>
Re: autovaccum task got cancelled Kevin Grittner <kgrittn@ymail.com>
Re: autovaccum task got cancelled Gary Fu <gfu@sigmaspace.com>
Re: How to stop a query Scott Marlowe <scott.marlowe@gmail.com>
Re: How to stop a query Younus <younus.essahli@gmail.com>
Re: How to stop a query Guillaume Lelarge <guillaume@lelarge.info>
As Scott mentioned, kil=
l -9 on a Postgres process is not a wise idea on a Postgres process.=
If you query is coming from an=
other application, then terminating that application with a kill -9 *may* w=
ork, but is, as scott says, a last resortI tend to use kill -TERM (15) to disconnect the client, w=
hich gives the log message " terminating connection due to administrat=
or command"kill -INT (=
2) gives the "cancelling statement due to user request" and does =
not disconnect the client.So it depends on what you want to do.If i have a runaway query (not so common on 9.1 now), Then=
 i'll try the above, and if they don't work, then i'll try an /etc/init.d/p=
ostgresql stop or a pg_ctl stop -m f. then restart the server.Only if that does not work will i co=
nsider killing using a -9.Cheerspgsql-general-owner@postgresql=
.org wrote on 19/07/2012 17:25:57:> From: younus <younus.essa=
hli@gmail.com>> To: pgsql-genera=
l@postgresql.org, > Date: 19/07/201=
2 20:30> Subject: Re: [GENERAL] How=
 to stop a query> Sent by: pgsql-ge=
neral-owner@postgresql.org> >=
; Hi, > > Yes, I'm sure, it's work.> > if you e=
xecute query by another program (program java), you must use the> fi=
rst solution [ps -ef | grep postgres and  kill -9 (PID of your query)]=
.> > if you use pgsql terminal and you're connecting with pos=
tgres you can use > select procpid, datname, usename, client_addr, &=
nbsp;current_query from> pg_stat_activity where current_query!=3D'&l=
t;IDLE>';> SELECT pg_cancel_backend (procpid);> > <=
br>> > > Younus.> > --> View this mes=
sage in context: http://postgresql.&g=
t; 1045698.n5.nabble.com/How-to-stop-a-query-tp1924086p5717297.html>=
 Sent from the PostgreSQL - general mailing list archive at Nabble.com.=
> > -- > Sent via pgsql-general mailing list (pgsql-genera=
l@postgresql.org)> To make changes to your subscription:> http://www.postgr=
esql.org/mailpref/pgsql-general> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Romax Technology Limited
Rutherford House
Nottingham Science & Technology Park
Nottingham,=20
NG7 2PZ
England

Telephone numbers:
+44 (0)115 951 88 00 (main)

For other office locations see:
http://www.romaxtech.com/Contact
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
E-mail: info@romaxtech.com
Website: www.romaxtech.com
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Confidentiality Statement
This transmission is for the addressee only and contains information that i=
s confidential and privileged.
Unless you are the named addressee, or authorised to receive it on behalf o=
f the addressee=20
you may not copy or use it, or disclose it to anyone else.=20
If you have received this transmission in error please delete from your sys=
tem and contact the sender. Thank you for your cooperation.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
В списке pgsql-general по дате отправления
От: Nick
Дата:
От: Albe Laurenz
Дата:
FAQ