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 1kahQs-0000N3-V5 for pgsql-bugs@arkaria.postgresql.org; Thu, 05 Nov 2020 15:44:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kahQr-0002sV-T1 for pgsql-bugs@arkaria.postgresql.org; Thu, 05 Nov 2020 15:44:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kahOb-0001Et-7G for pgsql-bugs@lists.postgresql.org; Thu, 05 Nov 2020 15:41:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kahOZ-0003Yn-4v for pgsql-bugs@lists.postgresql.org; Thu, 05 Nov 2020 15:41:52 +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 0A5Ffmtg1473889; Thu, 5 Nov 2020 10:41:48 -0500 From: Tom Lane To: Alvaro Herrera cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16703: pg-dump fails to process recursive view definition In-reply-to: <1438431.1604588428@sss.pgh.pa.us> References: <16703-e348f58aab3cf6cc@postgresql.org> <1438431.1604588428@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 05 Nov 2020 10:00:28 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1473887.1604590908.1@sss.pgh.pa.us> Date: Thu, 05 Nov 2020 10:41:48 -0500 Message-ID: <1473888.1604590908@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > It seems like the least painful solution might be to teach > LockTableRecurse to detect recursion and just not recurse into > a view it's already locked. (BTW, I wonder if we shouldn't > have a stack depth check there, too.) Oh, I see it already has a recursion test ... it's just that throwing an error is an unnecessarily harsh reaction. We can just stop recursing. Will push a fix shortly. (Also, we need no check_stack_depth call here, because expression_tree_walker has one.) regards, tom lane