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 1l3Qhi-0002HO-JB for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jan 2021 21:44:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l3Qhg-00028g-PE for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jan 2021 21:44:20 +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 1l3Qhg-00028Y-It for pgsql-bugs@lists.postgresql.org; Sat, 23 Jan 2021 21:44:20 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l3Qhc-0006oY-Kr for pgsql-bugs@lists.postgresql.org; Sat, 23 Jan 2021 21:44:19 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id F0B7C5C0092; Sat, 23 Jan 2021 16:44:14 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 23 Jan 2021 16:44:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding: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=OtDcE0e3HQvOF8q/vj0ew/OGEiMpbBzEfNlqV12S1FM=; b=ZR60VDOE l6WfywPy2wuKAmc0litbtJUMsDGDlUYSMJYi9nqRfLGIyyuKmT8WkOycSN3UFNE7 6d9Dk62XYHm9SrD1pWhYBeg9Z3B5ptcnnJkYsStWfwIg547UqZCaz7hzL6/BpYXt SYOqjvnltHVRxZXaiRYjm8NAAVqCzQ26KPPtmtMLh67RoK0NW+ixevFoxOH/q+4/ TTlqL8/qtPDnVclNDa2ypTSI6PSPo84T94EDMQvjl7fv3VSbvf23M5Tt7eoUhs2F wBC0c0Yw+I1Kdbtrad+uIMhbI277CFWUC9B6yKQnx8qqKP9wdYrLvAPmlPYcV8eM 6rYOKUTNxgMsYg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudekgdduheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugfgjggfsehtke ertddtredunecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhr vgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpefghfehgfdtie dugfdvkeehgfeggfehjeekjefhhfejjeeftdfgkedugfevjedvtdenucffohhmrghinhep phhoshhtghhrrdgvshenucfkphepudeltddrleehrdduledrudejjeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.177]) by mail.messagingengine.com (Postfix) with ESMTPA id 5289D1080057; Sat, 23 Jan 2021 16:44:14 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id E19F22A0D15; Sat, 23 Jan 2021 18:44:11 -0300 (-03) Date: Sat, 23 Jan 2021 18:44:11 -0300 From: Alvaro Herrera To: pg@pmenke.de, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16794: BEFORE UPDATE FOR EACH ROW triggers on partitioned tables can break tuple moving UPDATEs Message-ID: <20210123214411.GA12320@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <16794-350a655580fbb9ae@postgresql.org> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Dec-28, PG Bug reporting form wrote: > i was testing the PG13 enhancement that should allow BEFORE ROW triggers on > partitioned tables, as long as they don't move the tuple to a different > partition (original thread: > https://postgr.es/m/20200227165158.GA2071@alvherre.pgsql). The actual > restriction on "not to move the tuple to a different partition" seems to be > a bit stronger though, as the trigger fails, even though not itself, but the > overarching UPDATE command, did move the tuple. Hi Philipp, thanks for reporting this issue. Yeah, that should definitely work. I'll have a look at this in a couple of days and try my best to have a fix for the February minors. Regards -- Álvaro Herrera Valdivia, Chile