From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | frank church <pgsql(at)adontendev(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is there a way to list runaway queries and kill them? |
Date: | 2006-01-17 17:13:01 |
Message-ID: | 20060117171301.GA10945@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2006-01-17 17:52:40 | Re: PostgreSQL Top 10 Wishlist |
Previous Message | Chris Browne | 2006-01-17 16:35:05 | Re: PostgreSQL Top 10 Wishlist |