From: Alvaro Herrera Date: Thu, 12 Mar 2020 18:33:02 -0300 Subject: [PATCH 8/8] reverse arguments .. isn't the other order a bug? --- src/backend/executor/nodeIncrementalSort.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/backend/executor/nodeIncrementalSort.c b/src/backend/executor/nodeIncrementalSort.c index 909d2df53f..bb88fca207 100644 --- a/src/backend/executor/nodeIncrementalSort.c +++ b/src/backend/executor/nodeIncrementalSort.c @@ -653,7 +653,7 @@ ExecIncrementalSort(PlanState *pstate) &node->incsort_info.fullsortGroupInfo, fullsort_state); - SO_printf("Setting execution_status to INCSORT_READFULLSORT (final tuple) \n"); + SO_printf("Setting execution_status to INCSORT_READFULLSORT (final tuple)\n"); node->execution_status = INCSORT_READFULLSORT; break; } @@ -713,7 +713,8 @@ ExecIncrementalSort(PlanState *pstate) * configuring sorting bound. */ SO2_printf("Changing bound_Done from %ld to %ld\n", - Min(node->bound, node->bound_Done + nTuples), node->bound_Done); + node->bound_Done, + Min(node->bound, node->bound_Done + nTuples)); node->bound_Done = Min(node->bound, node->bound_Done + nTuples); } @@ -721,7 +722,8 @@ ExecIncrementalSort(PlanState *pstate) * Once we find changed prefix keys we can complete the * sort and begin reading out the sorted tuples. */ - SO1_printf("Sorting fullsort tuplesort with %ld tuples\n", nTuples); + SO1_printf("Sorting fullsort tuplesort with %ld tuples\n", + nTuples); tuplesort_performsort(fullsort_state); if (pstate->instrument != NULL) @@ -882,7 +884,8 @@ ExecIncrementalSort(PlanState *pstate) * in configuring sorting bound. */ SO2_printf("Changing bound_Done from %ld to %ld\n", - Min(node->bound, node->bound_Done + nTuples), node->bound_Done); + node->bound_Done, + Min(node->bound, node->bound_Done + nTuples)); node->bound_Done = Min(node->bound, node->bound_Done + nTuples); } } -- 2.20.1 --jI8keyz6grp/JLjh--