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 1gsGiT-0003c6-Ta for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Feb 2019 00:41:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gsGiR-0007gZ-PV for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Feb 2019 00:41:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsGiR-0007a6-Et for pgsql-hackers@lists.postgresql.org; Sat, 09 Feb 2019 00:41:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsGiJ-0006mk-5y for pgsql-hackers@postgresql.org; Sat, 09 Feb 2019 00:41:53 +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 x190feSh029690; Fri, 8 Feb 2019 19:41:40 -0500 From: Tom Lane To: Alvaro Herrera cc: Peter Geoghegan , PostgreSQL Hackers Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages) In-reply-to: <20190208201925.GA5901@alvherre.pgsql> References: <20190208201925.GA5901@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 08 Feb 2019 17:19:25 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29688.1549672900.1@sss.pgh.pa.us> Date: Fri, 08 Feb 2019 19:41:40 -0500 Message-ID: <29689.1549672900@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2019-Feb-08, Tom Lane wrote: >> Also, I came across some coding in CloneFkReferencing() that looks fishy >> as hell: that function imagines that it can delete an existing trigger >> with nothing more than a summary CatalogTupleDelete(). I didn't do >> anything about that here, but if it's not broken, I'd like to see an >> explanation why not. I added a comment complaining about the lack of >> pg_depend cleanup, and there's also the question of whether we don't >> need to broadcast a relcache inval for the trigger's table. > Oops, this is new code in 0464fdf07f69 (Jan 21st). Unless you object, > I'll study a fix for this now, to avoid letting it appear in the minor > next week. +1. The best solution would presumably be to go through the normal object deletion mechanism; though possibly there's a reason that won't work given you're already inside some other DDL. regards, tom lane