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 1kqITU-0003h2-BW for pgsql-admin@arkaria.postgresql.org; Fri, 18 Dec 2020 16:19:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kqITS-0001eb-P1 for pgsql-admin@arkaria.postgresql.org; Fri, 18 Dec 2020 16:19:22 +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 1kqITS-0001eU-HU for pgsql-admin@lists.postgresql.org; Fri, 18 Dec 2020 16:19:22 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kqITM-0001Ls-6Y for pgsql-admin@lists.postgresql.org; Fri, 18 Dec 2020 16:19:22 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 84D905F7A2; Fri, 18 Dec 2020 11:19:15 -0500 (EST) Date: Fri, 18 Dec 2020 11:19:15 -0500 From: Stephen Frost To: Tom Lane Cc: Bruce Momjian , Scott Ribe , Pgsql-admin Subject: Re: 12 to 13 migration, the privs error with pg_pltemplate Message-ID: <20201218161915.GC16415@tamriel.snowman.net> References: <074FE83A-E924-4787-9E68-27EB9CE142B3@elevated-dev.com> <3264512.1607456932@sss.pgh.pa.us> <154608A6-0F38-4BE8-B3F4-3E3308691F91@elevated-dev.com> <2BD26D52-19B8-42CD-860D-B9AE21AF5C61@elevated-dev.com> <3632844.1607534358@sss.pgh.pa.us> <20201217184017.GA23245@momjian.us> <107286.1608231011@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Nf1csxeHLmcNDqbs" Content-Disposition: inline In-Reply-To: <107286.1608231011@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Nf1csxeHLmcNDqbs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Bruce Momjian writes: > > On Wed, Dec 9, 2020 at 12:19:18PM -0500, Tom Lane wrote: > >> Ah, I'm sorry, I pointed you at the wrong catalog entirely. It's > >> not pg_default_acl that controls this, it's pg_init_privs. I believe > >> what pg_dump is doing is emitting GRANT commands that replicate > >> the difference between pg_pltemplate's current actual privileges and > >> what is shown for it in pg_init_privs. So you need to make those > >> two things match, in whichever way is easiest. >=20 > > Should pg_dump or pg_upgrade be detecting and reporting these things, > > rather than requiring this analysis by the user? >=20 > It's a little premature to be considering that when we still haven't > identified exactly what the problem is. Pretty sure we did get to the bottom of it, the OP was just in the wrong database. Anastasia, as I recall, had a patch that worked to avoid dumping out privileges and such for things which disappeared but I don't think anyone ended up finding time to review and commit it. I do think that, in general, that was a good effort though and it'd be nice to get it (or something like it) committed to avoid having this issue for users who have GRANT'd rights to pg_catalog tables that are later changed between versions. Thanks, Stephen --Nf1csxeHLmcNDqbs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJf3NaDAAoJEO1sijiDR2RVLFAP/1CmxniuccNdaygnLIKKMhwq pebbZF00l8jr2zoSZPFm/7bQplvy7pZfjZliK5i5UAxUNw3+/L8MUvth2j2jqTTE r6JgbkPWBsNlqc7kCxtV+Av5xDy99+XgGIvvAlZQOb/ZDUHmBwKOn2YEVUVV9rft 4vu0R87JvJhe8hGiDSXIRKN/EclWLZO/Gxdssojd8P7wwIMyTKc/+0RpjLQB24tn RT8RCK8mKr47VHoOtdOS2OWq+nwDyIp9DDCZTHEaD4rdp1FxS7+WPHKbA6fCz8JX Roo3W2qP+UE34FEIPA+b+SbnmxSMNOBpuoxbOqy5oY1ur89lk3ctDDBDxrdu8yJX lMWzXF4jrEGDUSQlA0Sl2JSLSM6ug2LQ2b1TOAFtFv2f5nzyvhuEQOuPmOM4CFJm +hZvzTkfRu5Q/wl2I9Ic0lopsWbLMpnQwUAKoLa8HHU6Nc96XNWT/JrQjNEni7UI sRM4AQ1TRJKIj2SjsBqI47gB6ipaZWEwJV/nTlqFUvjKgHdvt+m7ibsIaPyKJyyS xcmJYnu9VdzxmPr1el9riV4jVVwVbHb83DsP/BTg+DGNADm/aeFKELXG2OmkaXtG Xo1EIQhaFX9lgyXvANwEuy57mTcEimJWPIblIa9VbRJ+qK76WDlcIrS66fBR4D5J eTuaN6IJNAAFDpnDQohY =OPkp -----END PGP SIGNATURE----- --Nf1csxeHLmcNDqbs--