Crap.
authorRobert Haas <[email protected]>
Wed, 19 Dec 2018 17:16:59 +0000 (12:16 -0500)
committerRobert Haas <[email protected]>
Wed, 19 Dec 2018 17:16:59 +0000 (12:16 -0500)
src/backend/commands/copy.c
src/backend/executor/execPartition.c
src/backend/executor/nodeModifyTable.c
src/include/executor/execPartition.h

index 4311e160076413cfeefab7200abe79b06dba8d97..1b69e3c700c5a144989fe6e4720271f4b04eb3ff 100644 (file)
@@ -2528,7 +2528,7 @@ CopyFrom(CopyState cstate)
         * CopyFrom tuple routing.
         */
        if (cstate->rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
-               proute = ExecSetupPartitionTupleRouting(NULL, cstate->rel);
+               proute = ExecSetupPartitionTupleRouting(estate, NULL, cstate->rel);
 
        /*
         * It's more efficient to prepare a bunch of tuples for insertion, and
index 179a501f3068b45df8533b26563b0cf8289a9e44..ed3616e6611938a19cb214bf88c2093ca7119454 100644 (file)
@@ -202,7 +202,7 @@ static void find_matching_subplans_recurse(PartitionPruningData *prunedata,
  * it should be estate->es_query_cxt.
  */
 PartitionTupleRouting *
-ExecSetupPartitionTupleRouting(ModifyTableState *mtstate, Relation rel)
+ExecSetupPartitionTupleRouting(EState *estate, ModifyTableState *mtstate, Relation rel)
 {
        PartitionTupleRouting *proute;
        ModifyTable *node = mtstate ? (ModifyTable *) mtstate->ps.plan : NULL;
index 3c60bbcd9c0e2e69e3f80ad0cc72b454d1d57ed5..91ffad26f0df7933b1074897b20d83dcddcb2cb7 100644 (file)
@@ -2229,7 +2229,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
        if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE &&
                (operation == CMD_INSERT || update_tuple_routing_needed))
                mtstate->mt_partition_tuple_routing =
-                       ExecSetupPartitionTupleRouting(mtstate, rel);
+                       ExecSetupPartitionTupleRouting(estate, mtstate, rel);
 
        /*
         * Build state for collecting transition tuples.  This requires having a
index d3cfb55f9f130aa44bb473e09117bbc0f6c43931..17766b1c49b9074e2d74b389825081392fb68fcf 100644 (file)
@@ -135,8 +135,8 @@ typedef struct PartitionPruneState
        PartitionPruningData *partprunedata[FLEXIBLE_ARRAY_MEMBER];
 } PartitionPruneState;
 
-extern PartitionTupleRouting *ExecSetupPartitionTupleRouting(ModifyTableState *mtstate,
-                                                          Relation rel);
+extern PartitionTupleRouting *ExecSetupPartitionTupleRouting(EState *estate,
+                                                          ModifyTableState *mtstate, Relation rel);
 extern ResultRelInfo *ExecFindPartition(ModifyTableState *mtstate,
                                  ResultRelInfo *rootResultRelInfo,
                                  PartitionTupleRouting *proute,