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 1l27gt-00067A-0G for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jan 2021 07:14:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l27gr-0004qZ-V0 for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jan 2021 07:14:05 +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 1l27gr-0004qR-0a for pgsql-hackers@lists.postgresql.org; Wed, 20 Jan 2021 07:14:05 +0000 Received: from wforward1-smtp.messagingengine.com ([64.147.123.30]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l27gj-0006XQ-HX for pgsql-hackers@postgresql.org; Wed, 20 Jan 2021 07:14:04 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailforward.west.internal (Postfix) with ESMTP id 3780115F4; Wed, 20 Jan 2021 02:13:54 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 20 Jan 2021 02:13:54 -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:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=nqvT0d0cZNHPn9fEclowlMoYICxsOsoRDtEhVfdf7 jU=; b=oKsCchBs99Z25ToaBEsPLBcobrsJHYSttBnENW4dxKtx7WjBeXXoqpWaN pZWZeHD/BK2kOLgcxIvngmWnzfI0Vq8VuwLJCtRptE4Uk565b5DIU0Qbscf2jRWi fq0tdRTDPQGi2cbwX+wCsDjhjf5jn6iB17HRXk2IC5vNAOl17mN3sfm7uVuKXikz UO3c6ylP8Ehnw32z183+5qoEvBdp6ZsrQzy5F1EjenYXEsSursluJf9SQXsze3J1 TrWwf/RECCNyj0iPaQ0oeRJTH9508QYquW9GgOiEdPRvHcNcDF2vj6xBeBNXDPP6 mFG+DHAqGLB+ZuNmS8wd81APxxmfA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddugddutdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefgefgtdejleevhfff veeghfejudevtdehkedugeejleefieffffevgeettdetgfenucffohhmrghinhepphhosh htghhrvghsqhhlrdhorhhgnecukfhppeekjedrudejjedrjedvrddugedvnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghish gvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: from april.pezone.net (p57b1488e.dip0.t-ipconnect.de [87.177.72.142]) by mail.messagingengine.com (Postfix) with ESMTPA id 919A124005C; Wed, 20 Jan 2021 02:13:51 -0500 (EST) Subject: Re: a misbehavior of partition row movement (?) To: Amit Langote , Arne Roland References: Cc: Tomas Vondra , "David G. Johnston" , PostgreSQL-development From: Peter Eisentraut Organization: EnterpriseDB Message-ID: <9288ff8b-3b6f-4ab5-e1a0-b9cff1a6d466@enterprisedb.com> Date: Wed, 20 Jan 2021 08:13:50 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021-01-08 09:54, Amit Langote wrote: >>> I don't quite recall if the decision to implement it like this was >>> based on assuming that this is what users would like to see happen in >>> this case or the perceived difficulty of implementing it the other way >>> around, that is, of firing AFTER UPDATE triggers in this case. >> I tried to look that up, but I couldn't find any discussion about this. Do you have any ideas in which thread that was handled? > It was discussed here: > > https://www.postgresql.org/message-id/flat/CAJ3gD9do9o2ccQ7j7%2BtSgiE1REY65XRiMb%3DyJO3u3QhyP8EEPQ%40mail.gmail.com > > It's a huge discussion, so you'll have to ctrl+f "trigger" to spot > relevant emails. You might notice that the developers who > participated in that discussion gave various opinions and what we have > today got there as a result of a majority of them voting for the > current approach. Someone also said this during the discussion: > "Regarding the trigger issue, I can't claim to have a terribly strong > opinion on this. I think that practically anything we do here might > upset somebody, but probably any halfway-reasonable thing we choose to > do will be OK for most people." So what we've got is that > "halfway-reasonable" thing, YMMV. :) Could you summarize here what you are trying to do with respect to what was decided before? I'm a bit confused, looking through the patches you have posted. The first patch you posted hard-coded FK trigger OIDs specifically, other patches talk about foreign key triggers in general or special case internal triggers or talk about all triggers.