aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2018-04-09 11:17:12 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2018-04-09 11:17:35 -0300
commitd7a95f06a1a125fd82b87d01d9a9d8cf9c081799 (patch)
tree775db6db5924bc10f3a9385d6363e10c1cc26f1d /src
parent7ba6ee815dc90d4fab7226d343bf72aa28c9aa5c (diff)
downloadpostgresql-d7a95f06a1a125fd82b87d01d9a9d8cf9c081799.tar.gz
postgresql-d7a95f06a1a125fd82b87d01d9a9d8cf9c081799.zip
Minor comment updates
Fix a couple of typos, and update a comment about why we set a BMS to NULL. Author: David Rowley Discussion: http://postgr.es/m/CAKJS1f-tux=KdUz6ENJ9GHM_V2qgxysadYiOyQS9Ko9PTteVhQ@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/executor/execPartition.c11
-rw-r--r--src/include/partitioning/partprune.h2
2 files changed, 8 insertions, 5 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.
diff --git a/src/include/partitioning/partprune.h b/src/include/partitioning/partprune.h
index f68b6c9935a..2ae2fd16ede 100644
--- a/src/include/partitioning/partprune.h
+++ b/src/include/partitioning/partprune.h
@@ -40,7 +40,7 @@ typedef struct PartitionPruneContext
/*
* Can be set when the context is used from the executor to allow params
- * found matching the partition key to be evaulated.
+ * found matching the partition key to be evaluated.
*/
PlanState *planstate;