aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2020-10-19 14:11:54 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2020-10-19 14:42:55 +0300
commit6973533650c04653d9018f61c1ac99ecb11094bd (patch)
tree9209fb7d616c51a3dde448a212d7443fd5d44edd /src/include/executor
parentf49b85d783f6781138f33bbe5f6e98da86907d84 (diff)
downloadpostgresql-6973533650c04653d9018f61c1ac99ecb11094bd.tar.gz
postgresql-6973533650c04653d9018f61c1ac99ecb11094bd.zip
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
Diffstat (limited to 'src/include/executor')
-rw-r--r--src/include/executor/execPartition.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/include/executor/execPartition.h b/src/include/executor/execPartition.h
index 6d1b7221987..74c39911b2a 100644
--- a/src/include/executor/execPartition.h
+++ b/src/include/executor/execPartition.h
@@ -37,12 +37,6 @@ typedef struct PartitionRoutingInfo
TupleConversionMap *pi_RootToPartitionMap;
/*
- * Map for converting tuples in partition format into the root partitioned
- * table format, or NULL if no conversion is required.
- */
- TupleConversionMap *pi_PartitionToRootMap;
-
- /*
* Slot to store tuples in partition format, or NULL when no translation
* is required between root and partition.
*/