Re: Permissions on postgresql.conf, psql and patroni

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Permissions on postgresql.conf, psql and patroni
Date: 2019-09-09 14:03:57
Message-ID: 28297.1568037837@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Peter J. Holzer" <hjp-pgsql(at)hjp(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-09-09 14:17:23 Re: database "cdf_100_1313" does not exist
Previous Message nikhil raj 2019-09-09 13:43:43 Re: database "cdf_100_1313" does not exist