Re: Can we avoid chdir'ing in resolve_symlinks() ? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Can we avoid chdir'ing in resolve_symlinks() ?
Date
Msg-id a4f73e5c-60ba-7fc2-252b-29bc946cee7e@enterprisedb.com
Whole thread Raw
In response to Re: Can we avoid chdir'ing in resolve_symlinks() ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Can we avoid chdir'ing in resolve_symlinks() ?
List pgsql-hackers
On 12.09.22 17:33, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
>> On 02.09.22 01:39, Tom Lane wrote:
>>> find_my_exec() wants to obtain an absolute, symlink-free path
>>> to the program's own executable, for what seem to me good
>>> reasons.
> 
>> I still think they are bad reasons, and we should kill all that code.
>> Just sayin' ...
> 
> Are you proposing we give up the support for relocatable installations?
> I'm not here to defend that feature, but I bet somebody will.  (And
> doesn't "make check" depend on it?)

I'm complaining specifically about the resolving of symlinks.  Why does

$ /usr/local/opt/postgresql@13/bin/pg_config --bindir

print

/usr/local/Cellar/postgresql@13/13.8/bin

when it clearly should print

/usr/local/opt/postgresql@13/bin

This is unrelated to the support for relocatable installations, AFAICT.




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Splitting up guc.c
Next
From: "Jonathan S. Katz"
Date:
Subject: Re: PostgreSQL 15 release announcement draft