From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Error handling (or lack of it) in RemovePgTempFilesInDir |
Date: | 2017-12-05 02:38:33 |
Message-ID: | 25332.1512441513@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> On Tue, Dec 5, 2017 at 11:15 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> The general theory I'm operating on is that we should endeavor to
>> let the database start in any situation where that doesn't involve
>> a data-corruption hazard. Yeah, it might not be nice if we leave
>> GB worth of temp files around, but is a postmaster start failure
>> better? I don't think so.
> I am getting the feeling that we are going to see people complain
> about those files lying around as well... That's as far as my opinion
> goes.
Perhaps, but surely it's inconsistent to consider that opendir()
failure is fatal while failing to unlink individual temp files
found by the directory scan is not. As an example, a pretty likely
scenario is that somehow a temp directory has been made unwritable
by the postmaster. The old coding would have let that pass without
even a bleat in the postmaster log; but it results in just the same
amount of disk space leakage as ignoring the temp directory because
we couldn't opendir() it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2017-12-05 02:43:15 | Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE |
Previous Message | Tom Lane | 2017-12-05 02:32:33 | Re: [HACKERS] pow support for pgbench |