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 1qPXlg-00BLbe-SE for pgsql-bugs@arkaria.postgresql.org; Sat, 29 Jul 2023 00:25:12 +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 1qPXkg-002YCx-3x for pgsql-bugs@arkaria.postgresql.org; Sat, 29 Jul 2023 00:24:10 +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 1qPXkf-002YCp-Rr for pgsql-bugs@lists.postgresql.org; Sat, 29 Jul 2023 00:24:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qPXkZ-000yWj-V7 for pgsql-bugs@lists.postgresql.org; Sat, 29 Jul 2023 00:24:08 +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 36T0O0ZT2427883; Fri, 28 Jul 2023 20:24:00 -0400 From: Tom Lane To: Kong Man cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: pg_restore 14 skips ACL COLUMN when --schema is used In-reply-to: References: Comments: In-reply-to Kong Man message dated "Fri, 28 Jul 2023 22:01:19 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2427881.1690590240.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 28 Jul 2023 20:24:00 -0400 Message-ID: <2427882.1690590240@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kong Man writes: > pg_restore --schema in our script used to work well against pg_restore 1= 0. Now that we are on PostgreSQL 14. pg_restore 14 skips ACL COLUMN, but= not ACL TABLE, when --schema is used. That's not the behavior I'm seeing. Would you mind providing a *complete* reproducer, not some fragments? The behavior I'm seeing is that neither a TABLE nor a COLUMN ACL will be restored, because (since v11) ACLs are restored only if their table is restored, and the --use-list option you are using excludes the table. We could perhaps imagine special-casing that, but I think it would be a wart, because for every other kind of object --use-list can only filter stuff out, not filter it in. (That is, if you are using --use-list along with other selectivity options, an object must pass both restrictions to be output. I don't want to make --use-list override other rules just for ACLs.) It would be interesting to see your actual use-case, because I suspect you may be doing something that there's a better way to do now. What set of objects are you trying to extract? regards, tom lane