postgresql/src
Thomas Munro ca9921936e Replace pgwin32_is_junction() with lstat().
Now that lstat() reports junction points with S_IFLNK/S_ISLINK(), and
unlink() can unlink them, there is no need for conditional code for
Windows in a few places.  That was expressed by testing for WIN32 or
S_ISLNK, which we can now constant-fold.

The coding around pgwin32_is_junction() was a bit suspect anyway, as we
never checked for errors, and we also know that errors can be spuriously
reported because of transient sharing violations on this OS.  The
lstat()-based code has handling for that.

This also reverts 4fc6b6ee on master only.  That was done because
lstat() didn't previously work for symlinks (junction points), but now
it does.

Tested-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/CA%2BhUKGLfOOeyZpm5ByVcAt7x5Pn-%3DxGRNCvgiUPVVzjFLtnY0w%40mail.gmail.com
(cherry picked from commit 5fc88c5d53)

Author: Thomas Munro <tmunro@postgresql.org>
Author: Alexandra Wang <alexandra.wang.oss@gmail.com>
2024-11-08 09:36:53 +10:30
..
backend Replace pgwin32_is_junction() with lstat(). 2024-11-08 09:36:53 +10:30
bin Replace pgwin32_is_junction() with lstat(). 2024-11-08 09:36:53 +10:30
common Replace pgwin32_is_junction() with lstat(). 2024-11-08 09:36:53 +10:30
fe_utils Don't spuriously report FD_SETSIZE exhaustion on Windows. 2023-10-14 15:54:49 -07:00
include Replace pgwin32_is_junction() with lstat(). 2024-11-08 09:36:53 +10:30
interfaces ecpg: Fix out-of-bound read in DecodeDateTime() 2024-10-23 08:35:05 +09:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl Further refine _SPI_execute_plan's rule for atomic execution. 2024-10-16 17:36:30 -04:00
port Replace pgwin32_is_junction() with lstat(). 2024-11-08 09:36:53 +10:30
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:29:03 -04:00
test Revert "For inplace update, send nontransactional invalidations." 2024-11-02 09:05:05 -07:00
timezone Update time zone data files to tzdata release 2024b. 2024-10-29 11:50:05 -04:00
tools Add missing include guard to win32ntdll.h. 2024-11-08 09:35:45 +10:30
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00