Re: Permissions on postgresql.conf, psql and patroni

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Permissions on postgresql.conf, psql and patroni
Дата
Msg-id 20190909171519.GA7858@hjp.at
обсуждение исходный текст
Ответ на Re: Permissions on postgresql.conf, psql and patroni  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: Permissions on postgresql.conf, psql and patroni
Список pgsql-general
On 2019-09-09 13:29:38 +0200, Daniel Verite wrote:
>     Peter J. Holzer wrote:
> > 2) Why does psql need to read postgresql.conf, and more specifically,
> >   why does it care about the location of the data directory? It
> >   shouldn't access files directly, just talk to the server via the
> >   socket.
>
> It's not psql itself, it's pg_wrapper.
>
> $ ls -l /usr/bin/psql
> lrwxrwxrwx 1 root root 37 Aug  8 12:48 /usr/bin/psql ->
> ../share/postgresql-common/pg_wrapper
>
> See http://manpages.ubuntu.com/manpages/bionic/man1/pg_wrapper.1.html

Ah, thanks.


On 2019-09-09 10:03:57 -0400, Tom Lane wrote:
> "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.

Yep. Daniel shoved me into the right direction. The message is from
PgCommon.pm, used by pg_wrapper.

It's a good thing both packages are maintained by the same team. Saves
the discussion who's going to fix it :-).

        hp


--
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

Вложения

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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: database "cdf_100_1313" does not exist
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Permissions on postgresql.conf, psql and patroni