Re: fd.c doesn't remove files on a crash-restart

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fd.c doesn't remove files on a crash-restart
Date: 2016-03-16 18:07:06
Message-ID: 56E9A0CA.7060804@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/16/2016 11:05 AM, Tom Lane wrote:
> "Joshua D. Drake" <jd(at)commandprompt(dot)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?

Oh, that seems absolutely reasonable. If we are using assert builds it
is because we are debugging something (or should be) anyway.

Sincerely,

JD

>
> regards, tom lane
>

--
Command Prompt, Inc. http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-03-16 18:08:52 Re: fd.c doesn't remove files on a crash-restart
Previous Message Joshua D. Drake 2016-03-16 18:06:23 Re: fd.c doesn't remove files on a crash-restart