Re: Checking pgwin32_is_junction() errors
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Michael Paquier <michael@paquier.xyz>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-08-06T01:02:41Z
Lists: pgsql-hackers
On Fri, Aug 5, 2022 at 9:17 PM Thomas Munro <thomas.munro@gmail.com> wrote: > Hmm, POSIX says st_link should contain the length of a symlink's > target path, so I suppose we should probably set that even though we > never consult it. Here's a version that does that. I also removed > the rest of the now redundant #ifdef S_ISLNK conditions. Pushed. Hmm, this stuff could *really* use a little test framework that's run by check-world, that exercises these various replacement operations. But I also suspect that problems in this area are likely to be due to concurrency. It's hard to make a simple test that simulates the case where a file is unlinked between system calls within stat() and hits the STATUS_DELETE_PENDING case. That check is code I cargo-culted in this patch. So much of the stuff we've had in the tree relating to that area has been wrong in the past...
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