Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZb2x-0007tF-2h for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Apr 2021 15:15:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZb2w-0003nJ-0X for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Apr 2021 15:15:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZb2v-0003ld-Qk for pgsql-bugs@lists.postgresql.org; Thu, 22 Apr 2021 15:15:13 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZb2t-0002Yf-00 for pgsql-bugs@lists.postgresql.org; Thu, 22 Apr 2021 15:15:13 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 9EFC65F799; Thu, 22 Apr 2021 11:15:09 -0400 (EDT) Date: Thu, 22 Apr 2021 11:15:09 -0400 From: Stephen Frost To: Mats Kindahl Cc: pgsql-bugs@lists.postgresql.org Subject: Re: Bug in handling default privileges inside extension update scripts Message-ID: <20210422151509.GU20766@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GDXYDO/HZ+4hGe/8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --GDXYDO/HZ+4hGe/8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Mats Kindahl (mats@timescale.com) wrote: > * To be able to read the configuration tables, "reader" need to have > SELECT privileges. >=20 > * Since the new role is added by the user and not by the extension, > the grants have to be dumped as well. Otherwise, a restore of the > data will have wrong privileges. >=20 > * Since new configuration tables could be added by an update of the > extension, it is necessary to make sure that these privileges are > added to new tables when updating. Typically, this means changing > the default privileges on the schema for the configuration files. If the extension is updated, I think it's entirely reasonable to expect an admin to have to go in and update the relevant permissions on any new tables that have come into existance and, as I've said elsewhere, I don't think that schema-level default privs should be applied to tables created by extensions. Sadly, no one else seems to have an opinion regarding that and so there hasn't been a change in that, yet, but that's the source of the issue imv. If you want to comment on that, I'd suggest doing so on that thread: https://www.postgresql.org/message-id/20200205034454.GU3195@tamriel.snowman= =2Enet Thanks, Stephen --GDXYDO/HZ+4hGe/8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJggZL9AAoJEO1sijiDR2RVZ80P/37aPa2Vfct1ywvrR8RwXxFT jkCZ/3Nj8lTZS4QRNZPpRYdQICrH9RjfvdAtGBtx+mdwNOZYtkASPPTKPZZGLH2S TMBasCqNvfHQiaRlEj9AfMkCkcsMO5g3xmPRAHxriQrkh/zussR8P4JmX/4IL1sO WVWukjERs8WyfHfKn4mmbxErLaBNixPwypWWmX7trU4S7dMZThcUqkVuKuJYu77K EpjBJFEguU12jG6tiAFHpu9ti0ghFNHjh0cfnaQYntf1bThYqfjg5LvJ9bw71t4G T+wI4ZrTOHhe28aE/ZVh/LUTxJkIVu1/RBmHiWHOGAOAq7xr+N6shuLkrXYSf+yx 8tO3PGPOCE9rHniG8pOFG8LdnLn9tHSLTsK1p+S3T6pg8vHKveUiyRCUZHozJAwc zxmb4x175RpRdLQ0vou8wXKfZB/qPEV9bYQQiQM3P5u0o/ilWH46zRxXWN0R0epy WebaBWyzGu/TdX6leT3jj81rMEOVNKkfE3zXn5HlciVep29lR6Fifpg+e4xqi6wM CPx74g0LM0d8jeJwh9LWfXAMrC9bdcEs2+4mP2YDroThQro/5mfJJfUiyKtf3jKq HNxMvBntqNwBrNBZBrusj/jmc6355ZbSF+Gs1eRwOUj2YjFoAFL1bNSJs7DLqGtJ w9t+T7Oa2Cx+Of2oupFf =nF05 -----END PGP SIGNATURE----- --GDXYDO/HZ+4hGe/8--