Re: Errands around AllocateDir()
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-12-04T22:17:21Z
Lists: 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
Commits
-
Clean up assorted messiness around AllocateDir() usage.
- 2069e6faa0f7 11.0 landed
- eccb786f471b 9.5.11 landed
- 5eefe7452ed0 9.3.21 landed
- 543d8c2f5d4c 9.6.7 landed
- 2a11b188e8ab 10.2 landed
- 225501cf754f 9.4.16 landed