Skip to content

Commit 1a40d37

Browse files
committed
Fix typos and improve incremental sort comments
Author: Justin Pryzby, James Coleman Discussion: https://postgr.es/m/20200419023625.GP26953@telsasoft.com
1 parent 7b48f1b commit 1a40d37

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/backend/commands/explain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,7 +2869,7 @@ show_incremental_sort_group_info(IncrementalSortGroupInfo *groupInfo,
28692869
}
28702870

28712871
/*
2872-
* If it's EXPLAIN ANALYZE, show tuplesort stats for a incremental sort node
2872+
* If it's EXPLAIN ANALYZE, show tuplesort stats for an incremental sort node
28732873
*/
28742874
static void
28752875
show_incremental_sort_info(IncrementalSortState *incrsortstate,
@@ -2917,7 +2917,7 @@ show_incremental_sort_info(IncrementalSortState *incrsortstate,
29172917
&incrsortstate->shared_info->sinfo[n];
29182918

29192919
/*
2920-
* If a worker hasn't process any sort groups at all, then exclude
2920+
* If a worker hasn't processed any sort groups at all, then exclude
29212921
* it from output since it either didn't launch or didn't
29222922
* contribute anything meaningful.
29232923
*/

src/backend/executor/nodeIncrementalSort.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,8 +1152,10 @@ ExecReScanIncrementalSort(IncrementalSortState *node)
11521152
/*
11531153
* If we've set up either of the sort states yet, we need to reset them.
11541154
* We could end them and null out the pointers, but there's no reason to
1155-
* repay the setup cost, and because guard setting up pivot comparator
1156-
* state similarly, doing so might actually cause a leak.
1155+
* repay the setup cost, and because ExecIncrementalSort guards
1156+
* presorted column functions by checking to see if the full sort state
1157+
* has been initialized yet, setting the sort states to null here might
1158+
* actually cause a leak.
11571159
*/
11581160
if (node->fullsort_state != NULL)
11591161
{

src/backend/utils/sort/tuplesort.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,11 +1428,11 @@ tuplesort_updatemax(Tuplesortstate *state)
14281428
}
14291429

14301430
/*
1431-
* Sort evicts data to the disk when it didn't manage to fit those data to
1432-
* the main memory. This is why we assume space used on the disk to be
1431+
* Sort evicts data to the disk when it wasn't able to fit that data into
1432+
* main memory. This is why we assume space used on the disk to be
14331433
* more important for tracking resource usage than space used in memory.
1434-
* Note that amount of space occupied by some tuple set on the disk might
1435-
* be less than amount of space occupied by the same tuple set in the
1434+
* Note that the amount of space occupied by some tupleset on the disk might
1435+
* be less than amount of space occupied by the same tupleset in
14361436
* memory due to more compact representation.
14371437
*/
14381438
if ((isSpaceDisk && !state->isMaxSpaceDisk) ||

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy