summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomas Vondra2020-05-12 17:37:13 +0000
committerTomas Vondra2020-05-12 17:37:13 +0000
commit1a40d37a9faff562a36bd255a993fd3503bdf2b1 (patch)
tree8a16e080c2f060613205b502e8d8ed12674fbad8 /src
parent7b48f1b490978a8abca61e9a9380f8de2a56f266 (diff)
Fix typos and improve incremental sort comments
Author: Justin Pryzby, James Coleman Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/explain.c4
-rw-r--r--src/backend/executor/nodeIncrementalSort.c6
-rw-r--r--src/backend/utils/sort/tuplesort.c8
3 files changed, 10 insertions, 8 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 5695802081d..06f4414109c 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -2869,7 +2869,7 @@ show_incremental_sort_group_info(IncrementalSortGroupInfo *groupInfo,
}
/*
- * If it's EXPLAIN ANALYZE, show tuplesort stats for a incremental sort node
+ * If it's EXPLAIN ANALYZE, show tuplesort stats for an incremental sort node
*/
static void
show_incremental_sort_info(IncrementalSortState *incrsortstate,
@@ -2917,7 +2917,7 @@ show_incremental_sort_info(IncrementalSortState *incrsortstate,
&incrsortstate->shared_info->sinfo[n];
/*
- * If a worker hasn't process any sort groups at all, then exclude
+ * If a worker hasn't processed any sort groups at all, then exclude
* it from output since it either didn't launch or didn't
* contribute anything meaningful.
*/
diff --git a/src/backend/executor/nodeIncrementalSort.c b/src/backend/executor/nodeIncrementalSort.c
index bfc2e4cf6b1..7af6a12a1e3 100644
--- a/src/backend/executor/nodeIncrementalSort.c
+++ b/src/backend/executor/nodeIncrementalSort.c
@@ -1152,8 +1152,10 @@ ExecReScanIncrementalSort(IncrementalSortState *node)
/*
* If we've set up either of the sort states yet, we need to reset them.
* We could end them and null out the pointers, but there's no reason to
- * repay the setup cost, and because guard setting up pivot comparator
- * state similarly, doing so might actually cause a leak.
+ * repay the setup cost, and because ExecIncrementalSort guards
+ * presorted column functions by checking to see if the full sort state
+ * has been initialized yet, setting the sort states to null here might
+ * actually cause a leak.
*/
if (node->fullsort_state != NULL)
{
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index de38c6c7e0a..d59e3d5a8d5 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -1428,11 +1428,11 @@ tuplesort_updatemax(Tuplesortstate *state)
}
/*
- * Sort evicts data to the disk when it didn't manage to fit those data to
- * the main memory. This is why we assume space used on the disk to be
+ * Sort evicts data to the disk when it wasn't able to fit that data into
+ * main memory. This is why we assume space used on the disk to be
* more important for tracking resource usage than space used in memory.
- * Note that amount of space occupied by some tuple set on the disk might
- * be less than amount of space occupied by the same tuple set in the
+ * Note that the amount of space occupied by some tupleset on the disk might
+ * be less than amount of space occupied by the same tupleset in
* memory due to more compact representation.
*/
if ((isSpaceDisk && !state->isMaxSpaceDisk) ||