Re: Safely Killing Backends (Was: Applications that leak connections)

From: Thomas F(dot)O'Connell <tfo(at)sitening(dot)com>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Paul Tillotson <pntil(at)shentel(dot)net>, Postgres General <pgsql-general(at)postgresql(dot)org>, Neil Conway <neilc(at)samurai(dot)com>
Subject: Re: Safely Killing Backends (Was: Applications that leak connections)
Date: 2005-02-04 20:09:24
Message-ID: 8f594851b6f0979b03c89f9940d594d4@sitening.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Which brings up a follow-up question: is it documented anywhere exactly
what goes on in recovery mode? If so, I've not found it.

When I've experienced this, it has seemed quicker just to stop and
restart postgres than to let recovery mode complete. Is that unsafe?

-tfo

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Feb 4, 2005, at 1:56 PM, Alvaro Herrera wrote:

> On Fri, Feb 04, 2005 at 01:44:10PM -0600, Thomas F.O'Connell wrote:
>> Is there any stronger medicine that's available (for instance, when a
>> backend won't respond to SIGTERM) and has no unfortunate side effects?
>> I just ran into this situation the other day (and made the unfortunate
>> discovery that SIGABRT is as bad as SIGKILL as far as a postmaster is
>> concerned).
>
> As soon as a backend dies a unnatural death, postmaster will rightly
> consider that it may have corrupted the shared state. In turn
> postmaster will kill all its children mercilessly so they don't spread
> the disease.
>
> Even SIGTERM can have bad consequences if it arrives at the wrong time.
> (That's why a function to close a remote connection was rejected.)
>
> So, short answer: no.
>
> --
> Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
> "La virtud es el justo medio entre dos defectos" (Aristóteles)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim Wilson 2005-02-04 20:58:33 Re: Safely Killing Backends (Was: Applications that leak connections)
Previous Message Alvaro Herrera 2005-02-04 19:56:12 Re: Safely Killing Backends (Was: Applications that leak connections)