Subject: Re: Remove support for old realpath() API

From: Heikki Linnakangas <[email-masked]>
Date: Mon, 5 Aug 2024 10:41:25 +0300

On 05/08/2024 09:12, Peter Eisentraut wrote:
> The now preferred way to call realpath() is by passing NULL as the
> second argument and get a malloc'ed result.  We still supported the
> old way of providing our own buffer as a second argument, for some
> platforms that didn't support the new way yet.  Those were only
> Solaris less than version 11 and some older AIX versions (7.1 and
> newer appear to support the new variant).  We don't support those
> platforms versions anymore, so we can remove this extra code.

+1

We don't seem to have any mentions of POSIX or SuS in docs, in the 
installation sections. There are a few mentions of POSIX-1.2008 and 
POSIX-1.2001 it in the commit log, though, where we require features 
specified by those. Can we rely on everything from POSIX-1-2008 
nowadays, or is it more on a case-by-case basis, depending on which 
parts of POSIX are supported by various platforms?

-- 
Heikki Linnakangas
Neon (https://neon.tech)

---

From: Tom Lane <[email-masked]>
Date: Mon, 05 Aug 2024 10:08:04 -0400

> parts of POSIX are supported by various platforms?

I'd say it's still case-by-case.  Perhaps everything in POSIX-1.2008
is supported now on every platform we care about, but perhaps not.

			regards, tom lane

---

From: Peter Eisentraut <[email-masked]>
Date: Mon, 12 Aug 2024 08:17:45 +0200

>> platforms versions anymore, so we can remove this extra code.

committed

---

From: Thomas Munro <[email-masked]>
Date: Mon, 12 Aug 2024 18:47:35 +1200

> >> platforms versions anymore, so we can remove this extra code.

I checked this in the AIX 7.3 manual and the POSIX 2008 way does not
appear to be mentioned there:

https://www.ibm.com/docs/en/aix/7.3?topic=r-realpath-subroutine

That's a bit confusing, or maybe there are just too many versioning
systems to keep track of and I've made a mistake, because it looks
like AIX 7.2.5+ has actual certification for Unix V7 AKA SUSv4 AKA
POSIX 2008...  Or maybe the documentation is wrong and it does
actually work.  I guess the IBM crew will be forced to look into this
as they continue to work on their PostgreSQL/AIX patch, if it doesn't
work...

---

From: Peter Eisentraut <[email-masked]>
Date: Mon, 12 Aug 2024 09:04:23 +0200

> as they continue to work on their PostgreSQL/AIX patch, if it doesn't

Tom had tested this on and found that it does actually work on AIX 7.1 
and 7.3 but the documentation is wrong.

---

From: Tom Lane <[email-masked]>
Date: Mon, 12 Aug 2024 10:05:18 -0400

> and 7.3 but the documentation is wrong.

I too have a distinct recollection of having tested this (using the
gcc compile farm machines), but I cannot find anything saying so in
the mailing list archives.  I can go check it again, I guess.

			regards, tom lane