Commit 1a40d37a authored by Tomas Vondra's avatar Tomas Vondra

Fix typos and improve incremental sort comments

Author: Justin Pryzby, James Coleman
Discussion: https://postgr.es/m/20200419023625.GP26953@telsasoft.com
parent 7b48f1b4
...@@ -2869,7 +2869,7 @@ show_incremental_sort_group_info(IncrementalSortGroupInfo *groupInfo, ...@@ -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 static void
show_incremental_sort_info(IncrementalSortState *incrsortstate, show_incremental_sort_info(IncrementalSortState *incrsortstate,
...@@ -2917,7 +2917,7 @@ show_incremental_sort_info(IncrementalSortState *incrsortstate, ...@@ -2917,7 +2917,7 @@ show_incremental_sort_info(IncrementalSortState *incrsortstate,
&incrsortstate->shared_info->sinfo[n]; &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 * it from output since it either didn't launch or didn't
* contribute anything meaningful. * contribute anything meaningful.
*/ */
......
...@@ -1152,8 +1152,10 @@ ExecReScanIncrementalSort(IncrementalSortState *node) ...@@ -1152,8 +1152,10 @@ ExecReScanIncrementalSort(IncrementalSortState *node)
/* /*
* If we've set up either of the sort states yet, we need to reset them. * 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 * 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 * repay the setup cost, and because ExecIncrementalSort guards
* state similarly, doing so might actually cause a leak. * 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) if (node->fullsort_state != NULL)
{ {
......
...@@ -1428,11 +1428,11 @@ tuplesort_updatemax(Tuplesortstate *state) ...@@ -1428,11 +1428,11 @@ tuplesort_updatemax(Tuplesortstate *state)
} }
/* /*
* Sort evicts data to the disk when it didn't manage to fit those data to * Sort evicts data to the disk when it wasn't able to fit that data into
* the main memory. This is why we assume space used on the disk to be * 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. * 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 * Note that the amount of space occupied by some tupleset on the disk might
* be less than amount of space occupied by the same tuple set in the * be less than amount of space occupied by the same tupleset in
* memory due to more compact representation. * memory due to more compact representation.
*/ */
if ((isSpaceDisk && !state->isMaxSpaceDisk) || if ((isSpaceDisk && !state->isMaxSpaceDisk) ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment