diff options
Diffstat (limited to 'src/backend/executor/execPartition.c')
-rw-r--r-- | src/backend/executor/execPartition.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c index 50bea2c2ceb..d4d54e927a5 100644 --- a/src/backend/executor/execPartition.c +++ b/src/backend/executor/execPartition.c @@ -1524,9 +1524,12 @@ ExecFindInitialMatchingSubPlans(PartitionPruneState *prunestate, int nsubnodes) /* * Record that partition pruning has been performed for external params. - * This partly also serves to ensure we never call this function twice - * with the same input and also so that ExecFindMatchingSubPlans is aware - * that pruning has already been performed for external Params. + * These are not required again afterwards, and nullifying them helps + * ensure nothing accidentally calls this function twice on the same + * PartitionPruneState. + * + * (Note we keep prunestate->allparams, because we do use that one + * repeatedly in ExecFindMatchingSubPlans). */ bms_free(prunestate->extparams); prunestate->extparams = NULL; @@ -1607,7 +1610,7 @@ ExecFindInitialMatchingSubPlans(PartitionPruneState *prunestate, int nsubnodes) /* * ExecFindMatchingSubPlans - * Determine which subplans match the the pruning steps detailed in + * Determine which subplans match the pruning steps detailed in * 'pprune' for the current Param values. * * Here we utilize both external and exec Params for pruning. |