Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, MauMau <maumau307(at)gmail(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)
Date: 2013-02-01 15:12:28
Message-ID: 14201.1359731548@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2013-02-01 08:55:24 -0500, Peter Eisentraut wrote:
>> I found an old patch that I had prepared for this, which I have
>> attached. YMMV.

>> +static void
>> +quickdie_alarm_handler(SIGNAL_ARGS)
>> +{
>> + /*
>> + * We got here if ereport() was blocking, so don't go there again
>> + * except when really asked for.
>> + */
>> + elog(DEBUG5, "quickdie aborted by alarm");
>> +

> Its probably not wise to enter elog.c again, that path might allocate
> memory and we wouldn't be any wiser. Unfortunately there's not much
> besides a write(2) to stderr that can safely be done...

Another objection to this is it still doesn't fix the case where the
process has blocked SIGQUIT. My faith that libperl, libR, etc will
never do that is nil.

I think if we want something that's actually trustworthy, the
wait-and-then-kill logic has to be in the postmaster.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-02-01 15:17:25 Re: autovacuum not prioritising for-wraparound tables
Previous Message Alvaro Herrera 2013-02-01 14:07:23 Re: [PATCH] HOT on tables with oid indexes broken