Skip to content

Commit d7a95f0

Browse files
committed
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
1 parent 7ba6ee8 commit d7a95f0

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/backend/executor/execPartition.c

+7-4
Original file line numberDiff line numberDiff line change
@@ -1524,9 +1524,12 @@ ExecFindInitialMatchingSubPlans(PartitionPruneState *prunestate, int nsubnodes)
15241524

15251525
/*
15261526
* Record that partition pruning has been performed for external params.
1527-
* This partly also serves to ensure we never call this function twice
1528-
* with the same input and also so that ExecFindMatchingSubPlans is aware
1529-
* that pruning has already been performed for external Params.
1527+
* These are not required again afterwards, and nullifying them helps
1528+
* ensure nothing accidentally calls this function twice on the same
1529+
* PartitionPruneState.
1530+
*
1531+
* (Note we keep prunestate->allparams, because we do use that one
1532+
* repeatedly in ExecFindMatchingSubPlans).
15301533
*/
15311534
bms_free(prunestate->extparams);
15321535
prunestate->extparams = NULL;
@@ -1607,7 +1610,7 @@ ExecFindInitialMatchingSubPlans(PartitionPruneState *prunestate, int nsubnodes)
16071610

16081611
/*
16091612
* ExecFindMatchingSubPlans
1610-
* Determine which subplans match the the pruning steps detailed in
1613+
* Determine which subplans match the pruning steps detailed in
16111614
* 'pprune' for the current Param values.
16121615
*
16131616
* Here we utilize both external and exec Params for pruning.

src/include/partitioning/partprune.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef struct PartitionPruneContext
4040

4141
/*
4242
* Can be set when the context is used from the executor to allow params
43-
* found matching the partition key to be evaulated.
43+
* found matching the partition key to be evaluated.
4444
*/
4545
PlanState *planstate;
4646

0 commit comments

Comments
 (0)