Re: Permissions on postgresql.conf, psql and patroni

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Permissions on postgresql.conf, psql and patroni
Дата
Msg-id 28297.1568037837@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Permissions on postgresql.conf, psql and patroni  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Ответы Re: Permissions on postgresql.conf, psql and patroni
Список pgsql-general
"Peter J. Holzer" <hjp-pgsql@hjp.at> writes:
> Yesterday I "apt upgrade"d patroni (to version 1.6.0-1.pgdg18.04+1 from
> http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main).
> Today I noticed that I couldn't invoke psql as an unprivileged user
> anymore:
> % psql
> Error: Invalid data directory for cluster 11 main

FYI, there's no such error string in the core Postgres sources.
I imagine that it's coming from some wrapper script.

> 1) Is there a reason to restrict read access to postgresql.conf to the
>    user postgres?

Probably not, though it only matters if you keep that outside the
data directory.

> 2) Why does psql need to read postgresql.conf, and more specifically,
>    why does it care about the location of the data directory?

psql itself won't/doesn't.  I suspect you're dealing with a wrapper
that is trying to figure out which version of psql to invoke.

            regards, tom lane



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

Предыдущее
От: nikhil raj
Дата:
Сообщение: Re: database "cdf_100_1313" does not exist
Следующее
От: Tom Lane
Дата:
Сообщение: Re: database "cdf_100_1313" does not exist