Re: How to stop a query
| От | Younus |
|---|---|
| Тема | Re: How to stop a query |
| Дата | |
| Msg-id | CABu0ooGBV+Sbti5B+nRDZUB2tbS9OaT_XQfcbD--dhd8N66ShA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: How to stop a query (Scott Marlowe <scott.marlowe@gmail.com>) |
| Список | pgsql-general |
Hi Scott,
2012/7/19 Scott Marlowe <scott.marlowe@gmail.com>
On Thu, Jul 19, 2012 at 3:17 AM, younus <younus.essahli@gmail.com> wrote:NEVER kill -9 a postgres process unless you've exhausted all other
> Hi,
>
> First :
> ps -ef | grep postgres
> and kill -9 (PID of your query)
possibilities, as it forces a restart of all the other backends as
well. A plain kill (no -9) is usually all you need, and it doesn't
cause all the other backends to restart and flush all shared memory.MUCH better way of doing things.
> Sec :
> select procpid, datname, usename, client_addr, current_query from
> pg_stat_activity where current_query!='<IDLE>';
>
> and
>
> SELECT pg_cancel_backend(procpid);
В списке pgsql-general по дате отправления: