Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [GENERAL] (Never?) Kill Postmaster?

From: Tommy Gildseth <tommy.gildseth(at)usit.uio.no>
Date: Wed Oct 24 2007 - 02:36:30 EDT


Pavel Stehule wrote:
> 2007/10/24, Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>:
>
>> I read dozens of times the "TIP 2: Don't 'kill -9' the postmaster"...
>>
>> Now, what am I supposed to do if I launched a query which takes ages, and
>> which I want to interrupt?
> you have to use more gently way
>
> select pg_cancel_backend()
> http://www.postgresql.org/docs/current/interactive/functions-admin.html

The problem is that pg_cancel_backend() is somewhat unreliable at cancelling wayward queries. You can try other options for kill though, other than -9, which is kind of a last resort.

-- 
Tommy Gildseth


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Received on Wed Oct 24 02:40:36 2007

This archive was generated by hypermail 2.1.8 : Mon Jun 16 2008 - 18:45:55 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library