aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorJohn Naylor <john.naylor@postgresql.org>2023-01-09 16:53:21 +0700
committerJohn Naylor <john.naylor@postgresql.org>2023-01-09 16:53:21 +0700
commit2673ebf49acfd83b09c777ced8f21eacd27b51ce (patch)
tree84411d41071fc2e9e79292a29d0dbd2d74ff528a /src/backend
parentc06caa0d622b21c617d10504d1c1a39dbd2d3f1e (diff)
downloadpostgresql-2673ebf49acfd83b09c777ced8f21eacd27b51ce.tar.gz
postgresql-2673ebf49acfd83b09c777ced8f21eacd27b51ce.zip
Remove redundant setting of tuplesort status
Also add an explanatory comment to match other similar coding within tuplesort_performsort(). Xing Guo Reviewed by Richard Guo and Cary Huang Discussion: https://www.postgresql.org/message-id/CACpMh%2BAQ4GXRKKi9ib2ioUH%2BqwNaSAVbetssJ0tMPfxAWuL2yg%40mail.gmail.com
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/utils/sort/tuplesort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index 1fadeea99e1..9ca9835aab6 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -1439,13 +1439,13 @@ tuplesort_performsort(Tuplesortstate *state)
* We were able to accumulate all the tuples required for output
* in memory, using a heap to eliminate excess tuples. Now we
* have to transform the heap to a properly-sorted array.
+ * Note that sort_bounded_heap sets the correct state->status.
*/
sort_bounded_heap(state);
state->current = 0;
state->eof_reached = false;
state->markpos_offset = 0;
state->markpos_eof = false;
- state->status = TSS_SORTEDINMEM;
break;
case TSS_BUILDRUNS: