Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpdZw-0002mg-P9 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 19:02:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpdZv-0000pQ-H2 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 19:02:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpdZv-0000pJ-8h for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 19:02:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpdZs-0002tY-Ny for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 19:02:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6MJ2OVU011608; Mon, 22 Jul 2019 15:02:24 -0400 From: Tom Lane To: Alvaro Herrera cc: pgsql-hackers@lists.postgresql.org, Manuel Rigger Subject: Re: Broken defenses against dropping a partitioning column In-reply-to: <26099.1563560043@sss.pgh.pa.us> References: <20190708143153.GA5929@alvherre.pgsql> <30041.1562597936@sss.pgh.pa.us> <26099.1563560043@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 19 Jul 2019 14:14:03 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11606.1563822144.1@sss.pgh.pa.us> Date: Mon, 22 Jul 2019 15:02:24 -0400 Message-ID: <11607.1563822144@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Here's a proposed patch for that. It's mostly pretty straightforward, > except I had to add some recursion defenses in findDependentObjects that > weren't there before. But those seem like a good idea anyway to prevent > infinite recursion in case of bogus entries in pg_depend. > Per above, I'm envisioning applying this to HEAD and v12 with a catversion > bump, and to v11 and v10 with no catversion bump. Pushed. Back-patching turned up one thing I hadn't expected: pre-v12 pg_dump bleated about circular dependencies. It turned out that Peter had already installed a hack in pg_dump to suppress that complaint in connection with generated columns, so I improved the comment and back-patched that too. I nearly missed the need for that because of all the noise that check-world emits in pre-v12 branches. We'd discussed back-patching eb9812f27 at the time, and I think now it's tested enough that doing so is low risk (or at least, lower risk than the risk of not seeing a failure). So I think I'll go do that now. regards, tom lane