Re: Errands around AllocateDir() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Errands around AllocateDir()
Date
Msg-id 21908.1512438411@sss.pgh.pa.us
Whole thread Raw
In response to Re: Errands around AllocateDir()  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> Note I am +/-0 with exposing ReadDirExtended in back-branches, because
> there is no use for it yet there.

My thought is basically that we might end up back-patching some change
that needs that.  Nothing I've done today requires it, but it seems like
a very harmless guard against future problems.

I am BTW wondering whether any of the other directory scan loops in
the backend ought to be converted from ReadDir to ReadDirExtended(LOG).
I'm just finishing up making ResetUnloggedRelations() go the other way,
because of the argument that failing to reset unlogged relations would
be a data corruption hazard.  But there may well be other cases where
the best thing on balance is to log the problem and press on.  With
the changes we've made today, it's a very easy fix to flip from one
behavior to the other.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Error handling (or lack of it) in RemovePgTempFilesInDir
Next
From: Peter Geoghegan
Date:
Subject: Re: Add PGDLLIMPORT lines to some variables