Re: partition routing layering in nodeModifyTable.c
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Daniel Gustafsson <daniel@yesql.se>, Etsuro Fujita <etsuro.fujita@gmail.com>, Andres Freund <andres@anarazel.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-10-20T02:28:26Z
Lists: pgsql-hackers
On Mon, Oct 19, 2020 at 8:48 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote: > On 19/10/2020 07:54, Amit Langote wrote: > > On Sun, Oct 18, 2020 at 12:54 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > >> Well, I was thinking on making the ri_PartitionInfo be about > >> partitioning in general, not just specifically for partition tuple > >> routing. Maybe Heikki is right that it may end up being simpler to > >> remove ri_PartitionInfo altogether. It'd just be a couple of additional > >> pointers in ResultRelInfo after all. > > > > So that's 2 votes for removing PartitionRoutingInfo from the tree. > > Okay, I have tried that in the attached 0002 patch. Also, I fixed > > some comments in 0001 that still referenced PartitionToRootMap. > > Pushed, with minor comment changes. Thank you. > I also noticed that the way the getTargetResultRelInfo() helper function > was used, was a bit messy. It was used when firing AFTER STATEMENT > triggers, but for some reason the code to fire BEFORE STATEMENT triggers > didn't use it but duplicated the logic instead. I made that a bit > simpler, by always setting the rootResultRelInfo field in > ExecInitModifyTable(), making the getTargetResultRelInfo() function > unnecessary. Good, I was mildly annoyed by that function too. -- Amit Langote EDB: http://www.enterprisedb.com
Commits
-
Fix initialization of es_result_relations in EvalPlanQualStart().
- 22b73d3cb0b5 14.0 landed
-
Remove PartitionRoutingInfo struct.
- fb5883da8615 14.0 landed
-
Revise child-to-root tuple conversion map management.
- 6973533650c0 14.0 landed
-
Clean up code to resolve the "root target relation" in nodeModifyTable.c
- f49b85d783f6 14.0 landed
-
Refactor code for cross-partition updates to a separate function.
- c5b097f8fa69 14.0 landed
-
Remove es_result_relation_info from EState.
- a04daa97a433 14.0 landed
-
Include result relation info in direct modify ForeignScan nodes.
- 178f2d560dde 14.0 landed
-
Create ResultRelInfos later in InitPlan, index them by RT index.
- 1375422c7826 14.0 landed