fix beginmerge() call by passing finalMergeBatch=true
authorTomas Vondra <[email protected]>
Wed, 9 Nov 2016 14:29:35 +0000 (15:29 +0100)
committerTomas Vondra <[email protected]>
Wed, 9 Nov 2016 14:29:35 +0000 (15:29 +0100)
Not sure this is the right value, perhaps it should be false.

src/backend/utils/sort/tuplesort.c

index 604e2a57f402f82b16986ba629c56cc02ab9dde1..144651c116e9555016e220da81b1fd9cc18e0edd 100644 (file)
@@ -1213,7 +1213,7 @@ tuplesort_begin_merge(TupleDesc tupDesc,
                state->tp_runs[i] = 1;
                state->tp_tapenum[i] = i;
        }
-       beginmerge(state);
+       beginmerge(state, true);        /* finalMergeBatch=true */
        state->status = TSS_FINALMERGE;
 
        MemoryContextSwitchTo(oldcontext);