pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove configure probes for symlink/readlink, and dead code.
Date: Thu, 04 Aug 2022 21:59:42 +0000
Message-ID: <E1oJisX-000Kmm-VS@gemulon.postgresql.org> (raw)

Remove configure probes for symlink/readlink, and dead code.

symlink() and readlink() are in SUSv2 and all targeted Unix systems have
them.  We have partial emulation on Windows.  Code that raised runtime
errors on systems without it has been dead for years, so we can remove
that and also references to such systems in the documentation.

Define HAVE_READLINK and HAVE_SYMLINK macros on Unix.  Our Windows
replacement functions based on junction points can't be used for
relative paths or for non-directories, so the macros can be used to
check for full symlink support.  The places that deal with tablespaces
can just use symlink functions without checking the macros.  (If they
did check the macros, they'd need to provide an #else branch with a
runtime or compile time error, and it'd be dead code.)

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2b1f580ee2ca373d0451d89a40fc8f0a5f55ede9

Modified Files
--------------
configure                               |  5 +----
configure.ac                            |  4 ----
doc/src/sgml/manage-ag.sgml             |  7 -------
doc/src/sgml/ref/create_tablespace.sgml |  4 ----
src/backend/access/transam/xlog.c       | 12 ------------
src/backend/commands/tablespace.c       | 13 -------------
src/backend/replication/basebackup.c    | 13 -------------
src/backend/utils/adt/misc.c            |  8 --------
src/bin/initdb/initdb.c                 |  4 ----
src/bin/pg_basebackup/pg_basebackup.c   |  4 ----
src/bin/pg_rewind/file_ops.c            |  5 -----
src/common/exec.c                       |  4 ++++
src/include/pg_config.h.in              |  6 ------
src/include/port.h                      |  8 ++++++++
src/tools/msvc/Solution.pm              |  2 --
15 files changed, 13 insertions(+), 86 deletions(-)



Message-ID: <E1oJisX-000Kmm-VS@gemulon.postgresql.org>
Permalink:  ../E1oJisX-000Kmm-VS@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oJisX-000Kmm-VS@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Remove configure probes for symlink/readlink, and dead code.
  In-Reply-To: <E1oJisX-000Kmm-VS@gemulon.postgresql.org>
  References: <E1oJisX-000Kmm-VS@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox