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 1nA7EL-00049e-IM for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jan 2022 09:26:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nA7EK-0003IK-Cm for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jan 2022 09:26:12 +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 1nA7EJ-0003IA-4g for pgsql-hackers@lists.postgresql.org; Wed, 19 Jan 2022 09:26:12 +0000 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nA7EE-0003Go-CE for pgsql-hackers@postgresql.org; Wed, 19 Jan 2022 09:26:10 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 9B0362B0092C; Wed, 19 Jan 2022 04:26:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 19 Jan 2022 04:26:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=3SxbNMShEEFKFvFKhGXAgTV/8T6cbuZg/aAQLAIp0kI=; b=Mdgqj4Rk s5CYjSdhHeodE5TS1WCxEech+VGNZ5fO+YAg9cmhIUdWFalSO5WDNpAXCYswfnUn 4QEQZLE8xZOaJiOJzW+MwlBP3aSZSg8bHJQo9/n/29XAgq+X3XQr+JDdI9jAyEDx WhVVbyZZZxB16kwf1vUtr++nnJWcMIw5uWB/idd17l/MVvdAsW1JPp0DnvQlpI5C PD6F1O9V0QSzHdBQuCdIWx7ZVFUR59bmxOktC2DmGMCkevF6T75nD0yh81KFAAZK DTnxTjNvbh25eI8uuWrWwwvTOLvSfQVRn/3jvHRusQ4Z4iTjoEr2WvyVjg5h4kzt atxrqzEAb5WzAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudehgddtfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepfeduleekteeigfegledtvddvvddtledugfefhfdtieevteef tdeuueehudeuvdelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhdpph hoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Jan 2022 04:26:01 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 99C4A2A07D3; Wed, 19 Jan 2022 06:25:58 -0300 (-03) Date: Wed, 19 Jan 2022 06:25:58 -0300 From: Alvaro Herrera To: Amit Langote Cc: Tom Lane , Andrew Dunstan , Ibrar Ahmed , Arne Roland , "David G. Johnston" , Masahiko Sawada , Peter Eisentraut , PostgreSQL-development , Rahila Syed , Tomas Vondra Subject: Re: a misbehavior of partition row movement (?) Message-ID: <202201190925.rrnex5zf56vz@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Jan-19, Amit Langote wrote: > BTW, your tweaks patch added this: > > + * *inserted_tuple is the tuple that's effectively inserted; > + * *inserted_destrel is the relation where it was inserted. > + * These are only set on success. FIXME -- see what happens on > the "do nothing" cases. > > If by "do nothing cases" you mean INSERT ON CONFLICT ... DO NOTHING, > then I don't think it matters, because the caller in that case would > be ExecModifyTable() which doesn't care about inserted_tuple and > inserted_destrel. No, I meant a FOR EACH ROW trigger that does RETURN NULL to "abort" the insertion. IIRC in non-partitioned cases it is possibly to break referential integrity by using those. What I was wondering is whether you can make this new code crash. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/ "I can see support will not be a problem. 10 out of 10." (Simon Wittber) (http://archives.postgresql.org/pgsql-general/2004-12/msg00159.php)