Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7NGB-00082l-NM for pgsql-general@arkaria.postgresql.org; Mon, 09 Sep 2019 17:15:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i7NG9-0005LH-AL for pgsql-general@arkaria.postgresql.org; Mon, 09 Sep 2019 17:15:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7NG8-0005Hb-Tx for pgsql-general@lists.postgresql.org; Mon, 09 Sep 2019 17:15:24 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7NG6-0001Pe-0f for pgsql-general@lists.postgresql.org; Mon, 09 Sep 2019 17:15:24 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id ACF347B8; Mon, 9 Sep 2019 19:15:19 +0200 (CEST) Date: Mon, 9 Sep 2019 19:15:19 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Permissions on postgresql.conf, psql and patroni Message-ID: <20190909171519.GA7858@hjp.at> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <28297.1568037837@sss.pgh.pa.us> <925de979-955f-45c3-a680-7893bb4afb17@manitou-mail.org> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > It's not psql itself, it's pg_wrapper. >=20 > $ ls -l /usr/bin/psql > lrwxrwxrwx 1 root root 37 Aug 8 12:48 /usr/bin/psql -> > ../share/postgresql-common/pg_wrapper >=20 > 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" 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 >=20 > 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 --=20 _ | 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 --/04w6evG8XlLl3ft Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl12iKIACgkQ8g5IURL+ KF19vQ/7BTU1NPP1SLum3J5ga5EpMiAJ4/3+xWrGVaVayog/FWE78sARYTuQYwkl ayyTC7IAi54UURZSTmsrL8sognbuBR9Nv9Df2cygBoYbCPkWUkTCQSuDNgAV68Gm lVhG6RqP1+SC27XcsLc+Eups5jIyhfOLzoWJUeK7YiCmlrVTeyTPn0yi5WEA2N33 UoIOuma4IfGtDPk7QesYbPi0qJbDH++Df4hyADro0ctd6iClrq/lPrrshBpOPdW+ /AyXuVVeNzzxyZItlTdmnSgnXV4ToF6R9soWSg6q6RLGFbgh9GYcEP5JONH5yr5m zcXSTibRZKR3afKD6aL1fFFxriyAXJz/PqV4GQn03N27wgdHSym+YUno5mT3UpHF I6stz/uNH9lMnTY0EaFIr5y+ctSWNShUgBDnB7VzlIYQJZjHMcATX4dBDbEt9dmn Jom4Pi6zsaso2TzaL5/hV/MCMUeMPwIPtN4LUzhONHEJmAwn9O37dVeG3m+oIpOA 2llXTCzBx+HKHhkZ3DZ4quQ5cfxUv/UAVG2n3Pp0dV+cGOPwOou0PNrkbKYY5k8N tg45LIUN1UNl1VaXC7+YskfSL7VCUrqzQ7VsQYKfzFR1z5ATmsOMl3MXCoczaSnJ FoMf8gXZ078Q0/XMaMnCz8+Bz81suPwfd/s0mgATxeDpsHrUzu0= =bOc8 -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--