postgresql/src/bin
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
..
initdb Translation updates 2024-08-05 12:22:08 +02:00
pg_amcheck Translation updates 2024-08-05 12:22:08 +02:00
pg_archivecleanup Translation updates 2024-08-05 12:22:08 +02:00
pg_basebackup Translation updates 2024-08-05 12:22:08 +02:00
pg_checksums Replace pgwin32_is_junction() with lstat(). 2024-11-08 09:36:53 +10:30
pg_config Translation updates 2024-08-05 12:22:08 +02:00
pg_controldata Translation updates 2024-08-05 12:22:08 +02:00
pg_ctl Fix Y2038 issues with MyStartTime. 2024-10-07 13:51:03 -05:00
pg_dump Restrict accesses to non-system views and foreign tables during pg_dump. 2024-08-05 06:05:23 -07:00
pg_resetwal Translation updates 2024-08-05 12:22:08 +02:00
pg_rewind Replace pgwin32_is_junction() with lstat(). 2024-11-08 09:36:53 +10:30
pg_test_fsync Translation updates 2024-08-05 12:22:08 +02:00
pg_test_timing Translation updates 2024-08-05 12:22:08 +02:00
pg_upgrade Translation updates 2024-08-05 12:22:08 +02:00
pg_verifybackup Translation updates 2024-08-05 12:22:08 +02:00
pg_waldump Translation updates 2024-08-05 12:22:08 +02:00
pgbench Improve test coverage for changes to inplace-updated catalogs. 2024-06-27 19:21:11 -07:00
pgevent Update copyright for 2021 2021-01-02 13:06:25 -05:00
psql Translation updates 2024-08-05 12:22:08 +02:00
scripts vacuumdb: Schema-qualify operator in catalog query's WHERE clause. 2024-10-07 16:49:20 -05:00
Makefile Add pg_amcheck, a CLI for contrib/amcheck. 2021-03-12 13:00:01 -05:00