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 dead ifaddr.c fallback code.
Date: Thu, 18 Aug 2022 04:34:02 +0000
Message-ID: <E1oOXEH-0003fb-6L@gemulon.postgresql.org> (raw)

Remove dead ifaddr.c fallback code.

We carried a special implementation of pg_foreach_ifaddr() using
Solaris's ioctl(SIOCGLIFCONF), but Solaris 11 and illumos adopted
getifaddrs() more than a decade ago, and we prefer to use that.  Solaris
10 is EOL'd.  Remove the dead code.

Adjust comment about which OSes have getifaddrs(), which also
incorrectly listed AIX.  AIX is in fact the only Unix in the build farm
that *doesn't* have it today, so the implementation based on
ioctl(SIOCGIFCONF) (note, no 'L') is still live.  All the others have
had it for at least one but mostly two decades.

The last-stop fallback at the bottom of the file is dead code in
practice, but it's hard to justify removing it because the better
options are all non-standard.

Discussion: https://postgr.es/m/CA+hUKGKErNfhmvb_H0UprEmp4LPzGN06yR2_0tYikjzB-2ECMw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a717cddcac518162cc17bae3c68a492db9ab2e75

Modified Files
--------------
src/backend/libpq/ifaddr.c | 112 +--------------------------------------------
1 file changed, 2 insertions(+), 110 deletions(-)



Message-ID: <E1oOXEH-0003fb-6L@gemulon.postgresql.org>
Permalink:  ../E1oOXEH-0003fb-6L@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oOXEH-0003fb-6L@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 dead ifaddr.c fallback code.
  In-Reply-To: <E1oOXEH-0003fb-6L@gemulon.postgresql.org>
  References: <E1oOXEH-0003fb-6L@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