Re: fd.c doesn't remove files on a crash-restart - Mailing list pgsql-hackers

From Robert Haas
Subject Re: fd.c doesn't remove files on a crash-restart
Date
Msg-id CA+TgmoZwGNFnng25xkJbqfkiaaKcnks6s7rBPKo_gM9HZqwqjQ@mail.gmail.com
Whole thread Raw
In response to Re: fd.c doesn't remove files on a crash-restart  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: fd.c doesn't remove files on a crash-restart
List pgsql-hackers
On Wed, Mar 16, 2016 at 2:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Joshua D. Drake" <jd@commandprompt.com> writes:
>> Hello,
>> fd.c[1] will remove files from pgsql_tmp on a restart but not a
>> crash-restart per this comment:
>
>> /*
>> * NOTE: we could, but don't, call this during a post-backend-crash restart
>> * cycle.  The argument for not doing it is that someone might want to
>> examine
>> * the temp files for debugging purposes.  This does however mean that
>> * OpenTemporaryFile had better allow for collision with an existing temp
>> * file name.
>> */
>
>> I understand that this is designed this way. I think it is a bad idea
>> because:
>
> Possible compromise: remove files only in non-Assert builds?

That sorta seems like tying two things together that aren't obviously
related.  I think building with --enable-cassert is support to enable
debugging cross-checks, not change behavior.

I would vote for removing them always, and if somebody doesn't want to
remove them, well then they can comment the code out.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Performance degradation in commit ac1d794
Next
From: Tom Lane
Date:
Subject: Re: fd.c doesn't remove files on a crash-restart