aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2020-05-12 19:37:13 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2020-05-12 19:37:13 +0200
commit1a40d37a9faff562a36bd255a993fd3503bdf2b1 (patch)
tree8a16e080c2f060613205b502e8d8ed12674fbad8 /src/backend/executor
parent7b48f1b490978a8abca61e9a9380f8de2a56f266 (diff)
downloadpostgresql-1a40d37a9faff562a36bd255a993fd3503bdf2b1.tar.gz
postgresql-1a40d37a9faff562a36bd255a993fd3503bdf2b1.zip
Fix typos and improve incremental sort comments
Author: Justin Pryzby, James Coleman Discussion: https://postgr.es/m/20200419023625.GP26953@telsasoft.com
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/nodeIncrementalSort.c6
1 files changed, 4 insertions, 2 deletions
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)
{