Unix Technical Forum

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

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 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008, 07:53 AM
frank church
 
Posts: n/a
Default Is there a way to list runaway queries and kill them?



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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-09-2008, 07:54 AM
Michael Fuhr
 
Posts: n/a
Default Re: Is there a way to list runaway queries and kill them?

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:41 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com