Re: Is there a way to list runaway queries and kill them?

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Is there a way to list runaway queries and kill them?
Дата
Msg-id 20060117171301.GA10945@winnie.fuhr.org
обсуждение исходный текст
Ответ на Is there a way to list runaway queries and kill them?  (frank church <pgsql@adontendev.net>)
Список pgsql-general
On Tue, Jan 17, 2006 at 09:38:37AM +0000, frank church wrote:
> Is there a way to list runaway or long runninng queries and kill them?

With the proper statistics collector settings you can see queries
with the pg_stat_activity view.  You can automatically kill
long-lasting queries by setting the statement_timeout parameter
(but beware of setting it globally -- you probably don't want to
time out maintenance operations like VACUUM).  In 8.0 and later you
can cancel a query in another backend with pg_cancel_backend().

http://www.postgresql.org/docs/8.1/interactive/monitoring-stats.html
http://www.postgresql.org/docs/8.1/interactive/runtime-config-client.html
http://www.postgresql.org/docs/8.1/interactive/functions-admin.html

(These links are for 8.1; use the documentation for whatever version
you're running.)

--
Michael Fuhr

В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: PostgreSQL Top 10 Wishlist
Следующее
От: David Fetter
Дата:
Сообщение: Re: PostgreSQL Top 10 Wishlist