From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Error handling (or lack of it) in RemovePgTempFilesInDir
Date: Mon, 04 Dec 2017 21:38:33 -0500
Message-ID: <25332.1512441513@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqRGpkpJp2UkxU04br+Ya3C+Hea0E1ocnjiLFHMaOF4zkw@mail.gmail.com>
References: <19907.1512402254@sss.pgh.pa.us>
<CAEepm=1k1OdQ2LpReSrA1h-NoSgospTQ9Vp4J_RE2aMXwjAS7A@mail.gmail.com>
<CAB7nPqTdmUUSu9AsrAz4fcFUFNAutw2av3EpHmRi7P7jKFf_bQ@mail.gmail.com>
<22163.1512438709@sss.pgh.pa.us>
<CAB7nPqT1Ubq2kOHyRhN__ud4t3f57HG1iw4O6W+3USvq5dsjjw@mail.gmail.com>
<24313.1512440129@sss.pgh.pa.us>
<CAB7nPqRGpkpJp2UkxU04br+Ya3C+Hea0E1ocnjiLFHMaOF4zkw@mail.gmail.com>
Michael Paquier <michael.paquier@gmail.com> writes:
> On Tue, Dec 5, 2017 at 11:15 AM, Tom Lane <tgl@sss.pgh.pa.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, thomas.munro@enterprisedb.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Error handling (or lack of it) in RemovePgTempFilesInDir
In-Reply-To: <25332.1512441513@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox