Re: Cancelling long running query?
От | Patrick Hatcher |
---|---|
Тема | Re: Cancelling long running query? |
Дата | |
Msg-id | OF4EA9DE7A.76914F4C-ON88256C6F.00587662-88256C6F.00595640@fds.com обсуждение исходный текст |
Ответ на | Cancelling long running query? ("Patrick Hatcher" <PHatcher@macys.com>) |
Список | pgsql-novice |
Thanks all. I should add a few things to this question: The queries would always be SELECT queries. Users would be doing the query from apps like NCR QueryMan or Crystal Reports. While I could connect to my box via the command line and kill the PID, I hoped there was a way to utilize the quit query capabilities both of these apps provide. Patrick Hatcher Macys.Com Legacy Integration Developer |--------+---------------------------------> | | Tom Lane | | | <tgl@sss.pgh.pa.us> | | | Sent by: | | | pgsql-novice-owner@post| | | gresql.org | | | | | | | | | 11/11/2002 04:58 PM | |--------+---------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: josh@agliodbs.com | | cc: "Patrick Hatcher" <PHatcher@macys.com>, pgsql-novice@postgresql.org | | Subject: Re: [NOVICE] Cancelling long running query? | >------------------------------------------------------------------------------------------------------------| Josh Berkus <josh@agliodbs.com> writes: >> How can I cancel a long running query besides quitting the app? > Methods: > 1) Shutdown and restart the database server with pg_ctl -m fast restart. Better is just to send SIGINT to the individual backend running the query. This is equivalent to the client having made a QueryCancel request. > 2) Kill the client connection proccess on the server side. This is dangerous > if the long-running query is a data-modification query. No more dangerous than any other forced database crash ... which is what you will get if you kill a backend process ... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
В списке pgsql-novice по дате отправления: