Re: Errands around AllocateDir()

2017-12-04 Thread Tom Lane
Michael Paquier 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 guar

Re: Errands around AllocateDir()

2017-12-04 Thread Michael Paquier
On Tue, Dec 5, 2017 at 4:11 AM, Alvaro Herrera wrote: > Tom Lane wrote: >> Yeah, agreed. The only thing I'm concerned about back-patching is >> the places where a wrong errno might be reported. > > If we're currently reporting "could not open dir: Success" then > backpatching such a fix is defini

Re: Errands around AllocateDir()

2017-12-04 Thread Michael Paquier
On Tue, Dec 5, 2017 at 7:17 AM, Tom Lane wrote: > Michael Paquier writes: >> I had a close look at all the callers of AllocateDir() and noticed a >> couple of unwelcome things (Tom noticed some of those in the thread >> mentioned above, I found others): > > Pushed with some minor additional fiddl

Re: Errands around AllocateDir()

2017-12-04 Thread Tom Lane
Michael Paquier writes: > I had a close look at all the callers of AllocateDir() and noticed a > couple of unwelcome things (Tom noticed some of those in the thread > mentioned above, I found others): Pushed with some minor additional fiddling. The most notable thing I changed was that instead o

Re: Errands around AllocateDir()

2017-12-04 Thread Alvaro Herrera
Tom Lane wrote: > Yeah, agreed. The only thing I'm concerned about back-patching is > the places where a wrong errno might be reported. If we're currently reporting "could not open dir: Success" then backpatching such a fix is definitely an improvement. OTOH if currently we have opendir() tryin

Re: Errands around AllocateDir()

2017-12-04 Thread Tom Lane
Robert Haas writes: > On Mon, Dec 4, 2017 at 12:05 PM, Tom Lane wrote: >> The only part of this that seems likely to be controversial is the >> decision to get rid of special-case error messages, eg replace >> "could not open tablespace directory \"%s\": %m" >> with the more generic >> "could not

Re: Errands around AllocateDir()

2017-12-04 Thread Robert Haas
On Mon, Dec 4, 2017 at 12:05 PM, Tom Lane wrote: > Michael Paquier writes: >> I had a close look at all the callers of AllocateDir() and noticed a >> couple of unwelcome things (Tom noticed some of those in the thread >> mentioned above, I found others): > > The only part of this that seems likel

Re: Errands around AllocateDir()

2017-12-04 Thread Tom Lane
Michael Paquier writes: > I had a close look at all the callers of AllocateDir() and noticed a > couple of unwelcome things (Tom noticed some of those in the thread > mentioned above, I found others): The only part of this that seems likely to be controversial is the decision to get rid of specia

Errands around AllocateDir()

2017-12-03 Thread Michael Paquier
Hi all, On the recent following thread problems around the use of AllocateDir() have been diagnosed with its use in the backend code: https://www.postgresql.org/message-id/20171127093107.1473.70...@wrigleys.postgresql.org I had a close look at all the callers of AllocateDir() and noticed a couple