Re: (Never?) Kill Postmaster?

From: Tommy Gildseth <tommy(dot)gildseth(at)usit(dot)uio(dot)no>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Stefan Schwarzer <stefan(dot)schwarzer(at)grid(dot)unep(dot)ch>, pgsql-general(at)postgresql(dot)org
Subject: Re: (Never?) Kill Postmaster?
Date: 2007-10-24 06:36:30
Message-ID: 471EE7EE.7060501@usit.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pavel Stehule wrote:
> 2007/10/24, Stefan Schwarzer <stefan(dot)schwarzer(at)grid(dot)unep(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christian Schröder 2007-10-24 06:49:04 Re: (Never?) Kill Postmaster?
Previous Message Pavel Stehule 2007-10-24 06:22:41 Re: function result cache for pl/pgsql