From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter J. Holzer <hjp-pgsql@hjp.at>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Permissions on postgresql.conf, psql and patroni
Date: Mon, 09 Sep 2019 10:03:57 -0400
Message-ID: <28297.1568037837@sss.pgh.pa.us> (raw)
In-Reply-To: <20190909105814.GB11736@hjp.at>
References: <20190909105814.GB11736@hjp.at>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, hjp-pgsql@hjp.at
Subject: Re: Permissions on postgresql.conf, psql and patroni
In-Reply-To: <28297.1568037837@sss.pgh.pa.us>
References: <20190909105814.GB11736@hjp.at> <28297.1568037837@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox