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 1gsWBp-0001bJ-3T for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Feb 2019 17:13:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gsWBl-0005bR-NZ for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Feb 2019 17:13:13 +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 1gsWBl-0005bE-D6 for pgsql-hackers@lists.postgresql.org; Sat, 09 Feb 2019 17:13:13 +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 1gsWBd-0002gu-Ru for pgsql-hackers@postgresql.org; Sat, 09 Feb 2019 17:13:11 +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 x19HD1tp024136; Sat, 9 Feb 2019 12:13:01 -0500 From: Tom Lane To: Amit Langote cc: Alvaro Herrera , Peter Geoghegan , PostgreSQL Hackers Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages) In-reply-to: References: <5943.1549728638@sss.pgh.pa.us> <20190209165010.GA4298@alvherre.pgsql> Comments: In-reply-to Amit Langote message dated "Sun, 10 Feb 2019 02:06:47 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24134.1549732381.1@sss.pgh.pa.us> Date: Sat, 09 Feb 2019 12:13:01 -0500 Message-ID: <24135.1549732381@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Langote writes: > Reading Tom's reply to my email, I wondered if performDeletion won't > do more than what the code is already doing (except calling the right > trigger deletion function which the current code doesn't), because the > trigger in question is an internal trigger without any dependencies > (the function it invokes are pinned by the system)? A big part of the point here is to not have to have such assumptions wired into the fk-cloning code. But even if that internal dependency is the only one the trigger is involved in, there are other steps in deleteOneObject that shouldn't be ignored. For example, somebody could've attached a comment to it. regards, tom lane