This is a discussion on Is there a way to list runaway queries and kill them? within the Pgsql General forums, part of the PostgreSQL category; --> Is there a way to list runaway or long runninng queries and kill them? Frank ---------------------------------------------------------------- This message was ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Is there a way to list runaway or long runninng queries and kill them? Frank ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| ||||
| 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/i...ing-stats.html http://www.postgresql.org/docs/8.1/i...ig-client.html http://www.postgresql.org/docs/8.1/i...ons-admin.html (These links are for 8.1; use the documentation for whatever version you're running.) -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |