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 1pk6S1-0000Mw-4s for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Apr 2023 16:57:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pk6S0-0003Kl-2G for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Apr 2023 16:57:36 +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 1pk6Rz-0003Kc-Pi for pgsql-bugs@lists.postgresql.org; Wed, 05 Apr 2023 16:57:35 +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 1pk6Rx-0006WC-MX for pgsql-bugs@lists.postgresql.org; Wed, 05 Apr 2023 16:57:34 +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 335GvT0k2005411; Wed, 5 Apr 2023 12:57:29 -0400 From: Tom Lane To: Alvaro Herrera cc: jazz001319@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17886: Error disabling user triggers on a partitioned table In-reply-to: <20230405073356.boweefqo5ec4dfhe@alvherre.pgsql> References: <20230405073356.boweefqo5ec4dfhe@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 05 Apr 2023 09:33:56 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2005409.1680713849.1@sss.pgh.pa.us> Date: Wed, 05 Apr 2023 12:57:29 -0400 Message-ID: <2005410.1680713849@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2023-Apr-04, Tom Lane wrote: >> I'm inclined to think that in the older branches (pre f4566345c) >> we need to do >> - if (oldtrig->tgisinternal) >> + if (oldtrig->tgisinternal && !OidIsValid(oldtrig->tgparentid)) >> but I've not tested that. Alvaro, what do you think? > Oh, that's a nice and clean solution. I tested it (on 13 and 14) and it > does solve the problem, and no regression tests fail, but I didn't try > to break it further. 12 and back are unaffected, for lack of > 86f575948c77. Pushed, thanks for looking at it. regards, tom lane