Re: Can we avoid chdir'ing in resolve_symlinks() ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Can we avoid chdir'ing in resolve_symlinks() ?
Дата
Msg-id 1653267.1679514749@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Can we avoid chdir'ing in resolve_symlinks() ?  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: Can we avoid chdir'ing in resolve_symlinks() ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> On 05.10.22 15:59, Tom Lane wrote:
>> What did you think of the compromise proposal to change only
>> the paths that pg_config outputs?  I've not tried to code that,
>> but I think it should be feasible.

> I don't think I understand what this proposal actually means.  What 
> would be the behavior of pg_config and how would it be different from 
> before?

What I had in mind was:

* server and most frontend programs keep the same behavior, that is
fully resolve their executable's path to an absolute path (and then
navigate to the rest of the installation from there); but now they'll
use realpath() to avoid chdir'ing while they do that.

* pg_config applies realpath() if its initial PATH search produces a
relative path to the executable, or if the last component of that path
is a symlink.  Otherwise leave it alone, which would have the effect of
not expanding directory-level symlinks.

I think that changing pg_config's behavior would be enough to resolve
the complaints you listed, but perhaps I'm missing some fine points.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: On login trigger: take three
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Non-superuser subscription owners