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

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: Repair two places where SIGTERM exit couldleave shared memory
Date: 2008-04-17 15:13:08
Message-ID: 20080417151308.GA18162@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Apr 17, 2008 at 04:03:18PM +0300, Heikki Linnakangas wrote:
> They do clean up on abort or SIGTERM. If you experience a sudden power
> loss, or kill -9 while CLUSTER or REINDEX is running, they will leave
> behind dangling files, but that's a different problem. It's not limited
> to utility commands like that either: if you create a table and copy a
> few gigabytes of data into it in a transaction, and crash before
> committing, you're left with a dangling file as well.

Is this so? This happened to me the other day (hence the question about
having COPY note failure earlier) because the disk filled up. I was
confused because du showed nothing. Eventually I did an lsof and found
the postgres backend had a large number of open file handles to deleted
files (each one gigabyte).

So something certainly deletes them (though maybe not on windows?)
before the transaction ends.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-04-17 15:48:41 Re: Re: [COMMITTERS] pgsql: Repair two places where SIGTERM exit couldleave shared memory
Previous Message Heikki Linnakangas 2008-04-17 13:17:35 Re: Re: [COMMITTERS] pgsql: Repair two places whereSIGTERM exit couldleave shared memory

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-04-17 15:48:41 Re: Re: [COMMITTERS] pgsql: Repair two places where SIGTERM exit couldleave shared memory
Previous Message Andrew Dunstan 2008-04-17 15:11:58 Re: get rid of psql welcome message