Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtD92-00BMmF-W1 for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Oct 2023 20:27:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qtD90-008lah-FA for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Oct 2023 20:27:55 +0000 Received: from makus.postgresql.org ([72.32.157.229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtD90-008laZ-5k for pgsql-hackers@lists.postgresql.org; Wed, 18 Oct 2023 20:27:54 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtD6s-00194u-92 for pgsql-hackers@lists.postgresql.org; Wed, 18 Oct 2023 20:25:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 39IKPd3O3152157; Wed, 18 Oct 2023 16:25:39 -0400 From: Tom Lane To: Stephen Frost cc: Jacob Champion , Andrew Dunstan , Akshat Jaimini , PostgreSQL Hackers Subject: Re: pg_dump needs SELECT privileges on irrelevant extension table In-reply-to: References: <00d46a48-3324-d9a0-49bf-e7f0f11d1038@timescale.com> <954419.1679334206@sss.pgh.pa.us> <2905669.1697573572@sss.pgh.pa.us> <2984517.1697577076@sss.pgh.pa.us> Comments: In-reply-to Stephen Frost message dated "Wed, 18 Oct 2023 16:11:59 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3152155.1697660739.1@sss.pgh.pa.us> Date: Wed, 18 Oct 2023 16:25:39 -0400 Message-ID: <3152156.1697660739@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Stephen Frost writes: > Greetings, > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> I wrote: >>> Why are we marking extension member objects as being subject to SECLABEL >>> or POLICY dumping? > This change would mean that policies added by a user after the extension > is created would just be lost by a pg_dump/reload, doesn't it? Yes. But I'd say that's unsupported, just like making other ad-hoc changes to extension objects is unsupported (and the effects will be lost on dump/reload). We specifically have support for user-added ACLs, and that's good, but don't claim that we have support for doing the same with policies. As far as I can see, the current behavior is that we'll dump and try to reload policies (and seclabels) on extension objects even if those properties were set by the extension creation script. That has many more problems than just the one Jacob is moaning about: you'll see failures at reload if you're not superuser, and if the destination installation has a newer version of the extension than what was dumped, the old properties might be completely inappropriate. So IMO there's basically nothing that works properly about this. To make it work, we'd need infrastructure comparable to the pg_init_privs infrastructure. regards, tom lane