Re: a misbehavior of partition row movement (?)
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Amit Langote <amitlangote09@gmail.com>, Arne Roland <A.Roland@index.de>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>,
"David G. Johnston" <david.g.johnston@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-01-20T07:13:50Z
Lists: pgsql-hackers
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.
Commits
-
Enforce foreign key correctly during cross-partition updates
- ba9a7e392171 15.0 landed
-
Create foreign key triggers in partitioned tables too
- f4566345cf40 15.0 landed