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 1kb3J6-0004Q4-Bz for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Nov 2020 15:05:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kb3J5-00038L-4s for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Nov 2020 15:05:39 +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 1kb3J4-00038D-Ud for pgsql-bugs@lists.postgresql.org; Fri, 06 Nov 2020 15:05:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kb3J2-00024y-Um for pgsql-bugs@lists.postgresql.org; Fri, 06 Nov 2020 15:05:38 +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 0A6F5WAZ1571035; Fri, 6 Nov 2020 10:05:32 -0500 From: Tom Lane To: Andrew Bille cc: Alvaro Herrera , exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16703: pg-dump fails to process recursive view definition In-reply-to: References: <16703-e348f58aab3cf6cc@postgresql.org> <1438431.1604588428@sss.pgh.pa.us> <1473888.1604590908@sss.pgh.pa.us> <1477409.1604593229@sss.pgh.pa.us> Comments: In-reply-to Andrew Bille message dated "Fri, 06 Nov 2020 21:28:09 +0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1571033.1604675132.1@sss.pgh.pa.us> Date: Fri, 06 Nov 2020 10:05:32 -0500 Message-ID: <1571034.1604675132@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Bille writes: > pg_dump is also fails to process the view created by the following script > (excerpt from privileges.sql): > CREATE USER user1; > CREATE TABLE test (col1 varchar(10), col2 boolean); > SET SESSION AUTHORIZATION user1; > CREATE VIEW testv AS SELECT * FROM test; Hm, yeah, so more to do here. (Sure glad we found these issues before next week's releases, not after.) I propose that what we'd better do is (1) Make pg_dump use LOCK TABLE ONLY, not LOCK TABLE. (2) Make LOCK TABLE ONLY on a view not recurse to the view's dependencies. It's quite unclear to me why it didn't work that way all along. regards, tom lane