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 1kV05a-0003mb-9P for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Oct 2020 22:26:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kV05Z-0004Vm-7v for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Oct 2020 22:26:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kV05Y-0004Vc-CC for pgsql-hackers@lists.postgresql.org; Tue, 20 Oct 2020 22:26:41 +0000 Received: from [64.147.123.24] (helo=wout1-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kV05V-0006Cs-AG for pgsql-hackers@postgresql.org; Tue, 20 Oct 2020 22:26:40 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 016E88D9; Tue, 20 Oct 2020 18:26:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 20 Oct 2020 18:26:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=0PnELMR7twlbXUjij 6kYjf7ocybn2GYEp8dSqrnC4TU=; b=MxRCMc9RBse4ppDLquRd73bRBomhkI5/A FGAK48wa2isSAbmFYGaauMPp8SRxrp/StSbMYGtdXg07Ves7cqcCf98kus3qlH0Z Y1b8QXwJWV/vflSPFt6mnDZp3iUOMaTKMrONfV5R28k23HaeQK1ijJieik6ADch+ sNut84wEy0L7H375EEaAU8OlSEAiIrb18aUQPFDGd2qhKDEO99HFv3iDiHrznF8B cjHhPm2gNHnSMW+ic469TbwDgiZhLMmt/sM/ZhqTde2Bl/pKWrE9MYPy8FrqTnYv ZeLByjkn0ruHqCvpKqt9HHuZoM+hvM73Z56iEJGRmCb1LhOAq8F2Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrjeeggddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtuggjfgesthdtredttdervdenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepvefgleevgeeujeeghfegteeghfegheeifeehheelteetiedu ieeihffggfehffetnecukfhppeduledtrdelhedrudelrddugeeknecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhv hhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.148]) by mail.messagingengine.com (Postfix) with ESMTPA id 1BDBF328005A; Tue, 20 Oct 2020 18:26:24 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id AC1022A104B; Tue, 20 Oct 2020 19:26:21 -0300 (-03) Date: Tue, 20 Oct 2020 19:26:21 -0300 From: Alvaro Herrera To: Justin Pryzby Cc: pgsql-hackers@postgresql.org, Amit Langote Subject: Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers Message-ID: <20201020222621.GA12830@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201020202001.GA6423@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.24 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Oct-20, Alvaro Herrera wrote: > > diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c > > index 511f015a86..c8d6f78da2 100644 > > --- a/src/backend/commands/tablecmds.c > > +++ b/src/backend/commands/tablecmds.c > > @@ -4321,6 +4321,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, > > case AT_DisableTrigAll: > > case AT_DisableTrigUser: > > ATSimplePermissions(rel, ATT_TABLE | ATT_FOREIGN_TABLE); > > + ATSimpleRecursion(wqueue, rel, cmd, recurse, lockmode, context); > > pass = AT_PASS_MISC; > > break; > > case AT_EnableRule: /* ENABLE/DISABLE RULE variants */ > > I'll add tests for both cases and push to all branches 11+. Pushed this part.