On Tue, Dec 5, 2017 at 10:51 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Michael Paquier <michael.paquier@gmail.com> writes:
>> On Tue, Dec 5, 2017 at 8:40 AM, Thomas Munro
>> <thomas.munro@enterprisedb.com> wrote:
>>> Belatedly, +1. The error hiding seemed a bit odd considering that we
>>> were prepared to log "unexpected file found ...". I probably should
>>> have questioned that instead of extending it monkey-see-monkey-do.
>
>> Well, I am -1 on this change. The coding before commit 561885d that
>> you have now pushed (timezone makes me answer later) was way more
>> conservative and I honestly preferred it as *only* the next postmaster
>> restart would remove remnant temp files which can cause potentially GB
>> of data to stay around.
>
> Uh ... I'm confused? That particular change only concerns whether we emit
> a log message, not whether the action is attempted or succeeds.
From the commit mentioned upthread, this switches one hard failure
when opening pg_tblspc to a LOG report:
@@ -3014,7 +3018,7 @@ RemovePgTempFiles(void)
*/
spc_dir = AllocateDir("pg_tblspc");
- while ((spc_de = ReadDir(spc_dir, "pg_tblspc")) != NULL)
+ while ((spc_de = ReadDirExtended(spc_dir, "pg_tblspc", LOG)) != NULL)
{
ReadDir() issues an ERROR when spc_dir is NULL..
--
Michael