Re: Re: [COMMITTERS] pgsql: Repair two places where SIGTERM exit couldleave shared memory - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Re: [COMMITTERS] pgsql: Repair two places where SIGTERM exit couldleave shared memory
Date
Msg-id 20080417151308.GA18162@svana.org
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Repair two places where SIGTERM exit couldleave shared memory  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: Re: [COMMITTERS] pgsql: Repair two places where SIGTERM exit couldleave shared memory  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: get rid of psql welcome message
Next
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Repair two places where SIGTERM exit couldleave shared memory