Re: Checking pgwin32_is_junction() errors
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-04-21T07:56:23Z
Lists: pgsql-hackers
On Thu, Mar 24, 2022 at 04:30:26PM +1300, Thomas Munro wrote: > I think it'd be better to add missing_ok and elevel parameters, > following existing patterns. Unfortunately, it can't use the generic > frontend logging to implement elevel in frontend code from its current > location, because pgport can't call pgcommon. For now I came up with > a kludge to work around that problem, but I don't like it, and would > need to come up with something better... The only barrier reason why elevel if needed is because of pg_wal in SyncDataDirectory() that cannot fail hard. I don't have a great idea here, except using a bits32 with some bitwise flags to control the behavior of the routine, aka something close to a MISSING_OK and a FAIL_HARD_ON_ERROR. This pattern exists already in some of the *Extended() routines. -- Michael
Commits
-
Fix readlink() for non-PostgreSQL junction points on Windows.
- f71007fbb3b8 16.0 landed
-
Fix stat() for recursive junction points on Windows.
- 4517358ee782 16.0 landed
-
aix: fix misreading of condition in 8f12a4e7add
- 7e29a79a46d3 16.0 cited
-
Make unlink() work for junction points on Windows.
- f357233c9db8 16.0 landed
-
Replace pgwin32_is_junction() with lstat().
- 5fc88c5d53e4 16.0 landed
-
Provide lstat() for Windows.
- c5cb8f3b770c 16.0 landed