git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: f49b85d) | patch
Revise child-to-root tuple conversion map management.
2020年10月19日 11:11:54 +0000 (14:11 +0300)
2020年10月19日 11:42:55 +0000 (14:42 +0300)
commit 6973533650c04653d9018f61c1ac99ecb11094bd
Revise child-to-root tuple conversion map management.

Store the tuple conversion map to convert a tuple from a child table's
format to the root format in a new ri_ChildToRootMap field in
ResultRelInfo. It is initialized if transition tuple capture for FOR
STATEMENT triggers or INSERT tuple routing on a partitioned table is
needed. Previously, ModifyTable kept the maps in the per-subplan
ModifyTableState->mt_per_subplan_tupconv_maps array, or when tuple
routing was used, in
ResultRelInfo->ri_Partitioninfo->pi_PartitionToRootMap. The new field
replaces both of those.

Now that the child-to-root tuple conversion map is always available in
ResultRelInfo (when needed), remove the TransitionCaptureState.tcs_map
field. The callers of Exec*Trigger() functions no longer need to set or
save it, which is much less confusing and bug-prone. Also, as a future
optimization, this will allow us to delay creating the map for a given
result relation until the relation is actually processed during
execution.

Author: Amit Langote
Discussion: https://www.postgresql.org/message-id/CA%2BHiwqHtCWLdK-LO%3DNEsvOdHx%2B7yv4mE_zYK0i3BH7dXb-wxog%40mail.gmail.com
src/backend/commands/copy.c diff | blob | blame | history
src/backend/commands/trigger.c diff | blob | blame | history
src/backend/executor/execMain.c diff | blob | blame | history
src/backend/executor/execPartition.c diff | blob | blame | history
src/backend/executor/nodeModifyTable.c diff | blob | blame | history
src/include/commands/trigger.h diff | blob | blame | history
src/include/executor/execPartition.h diff | blob | blame | history
src/include/nodes/execnodes.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /