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 1qTjPX-00AUP7-Jr for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Aug 2023 13:39:39 +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 1qTjPV-005RKc-UX for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Aug 2023 13:39:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qTjPV-005RKS-M8 for pgsql-bugs@lists.postgresql.org; Wed, 09 Aug 2023 13:39:38 +0000 Received: from [68.162.161.243] (helo=sss.pgh.pa.us) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qTjPP-001UGg-MS for pgsql-bugs@lists.postgresql.org; Wed, 09 Aug 2023 13:39:37 +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 379DdKeF087066; Wed, 9 Aug 2023 09:39:20 -0400 From: Tom Lane To: "Euler Taveira" cc: "Kong Man" , "pgsql-bugs@lists.postgresql.org" Subject: Re: pg_restore 14 skips ACL COLUMN when --schema is used In-reply-to: References: <2427882.1690590240@sss.pgh.pa.us> <90659bbc-e0cb-407d-b42b-5931346735ad@app.fastmail.com> <3317367.1691006807@sss.pgh.pa.us> <82fd2945-f56f-4e78-b0b5-222848ba8241@app.fastmail.com> Comments: In-reply-to "Euler Taveira" message dated "Tue, 08 Aug 2023 22:31:57 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <87064.1691588360.1@sss.pgh.pa.us> Date: Wed, 09 Aug 2023 09:39:20 -0400 Message-ID: <87065.1691588360@sss.pgh.pa.us> X-Host-Lookup-Failed: Reverse DNS lookup failed for 68.162.161.243 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Euler Taveira" writes: > On Wed, Aug 2, 2023, at 5:53 PM, Euler Taveira wrote: >> On Wed, Aug 2, 2023, at 5:06 PM, Tom Lane wrote: >>> Yeah, ignoring dependencies on ACLs in this logic seems like the best >>> way forward. Do you want to write a patch? >> I like your suggestion. Let me give it a try. Hmm, changing it like that seems likely to have a lot of unexpected side-effects. What I had in mind was to change the if (te->nDeps != 1 || TocIDRequired(AH, te->dependencies[0]) == 0) return 0; bit so that it would loop through the TE's dependencies to see if any one of them is a required non-ACL TE. We have to relax the "te->nDeps != 1" restriction, but we still want to check that there is a parent object that is being restored. Some work on the associated comment block seems appropriate too. And maybe add a test case? regards, tom lane