Re: Re: [COMMITTERS] pgsql: Repair two places whereSIGTERM exit couldleave shared memory

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: Repair two places whereSIGTERM exit couldleave shared memory
Date: 2008-04-17 13:17:35
Message-ID: 48074DEF.6000807@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Heikki Linnakangas wrote:
> Alvaro Herrera wrote:
>> Heikki Linnakangas wrote:
>>> Alvaro Herrera wrote:
>>>> Tom Lane wrote:
>>>>
>>>>> Also use this method
>>>>> for createdb cleanup --- that wasn't a shared-memory-corruption
>>>>> problem,
>>>>> but SIGTERM abort of createdb could leave orphaned files lying around.
>>>> I wonder if we could use this mechanism for cleaning up in case of
>>>> failed CLUSTER, REINDEX or the like. I think these can leave dangling
>>>> files around.
>>> They do clean up on abort or SIGTERM.
>>
>> Ah, we're OK then.
>
> Wait, my memory failed me! No, we don't clean up dangling files on
> SIGTERM. We should...

No, wait, we do after all. I was fooled by the new 8.3 behavior to leave
the files dangling until next checkpoint. The files are not cleaned up
immediately on SIGTERM, but they are at the next checkpoint.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Martijn van Oosterhout 2008-04-17 15:13:08 Re: Re: [COMMITTERS] pgsql: Repair two places where SIGTERM exit couldleave shared memory
Previous Message Heikki Linnakangas 2008-04-17 13:14:13 Re: Re: [COMMITTERS] pgsql: Repair two places whereSIGTERM exit couldleave shared memory

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2008-04-17 13:18:54 Re: Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout
Previous Message Heikki Linnakangas 2008-04-17 13:14:13 Re: Re: [COMMITTERS] pgsql: Repair two places whereSIGTERM exit couldleave shared memory