Hi hackers, The bounded heap sorting status flag is set twice in sort_bounded_heap() and tuplesort_performsort(). This patch helps remove one of them.
Best Regards, Xing
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index d90a1aebdf..84dc0d07f9 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2709,7 +2709,6 @@ sort_bounded_heap(Tuplesortstate *state) */ reversedirection(state); - state->status = TSS_SORTEDINMEM; state->boundUsed = true; }