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

From Tom Lane
Subject Re: Errands around AllocateDir()
Date
Msg-id 12680.1512425841@sss.pgh.pa.us
Whole thread Raw
In response to Errands around AllocateDir()  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Errands around AllocateDir()
List pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> 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 of this:

> - perform_base_backup() makes the mistake of not saving errno before
> CheckXLogRemoved() when AllocateDir returns NULL, which can lead to an
> incorrect error message.

I modified CheckXLogRemoved() to internally guarantee that it does not
change errno.  This is because there seemed to be other call sites that
were depending on that, not just this one.  Anyway, that seemed like a
more future-proof fix than relying on callers to deal with it.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process
Next
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] postgres_fdw super user checks