diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index b17347b214..09cb73657e 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -845,9 +845,9 @@ tuplesort_begin_batch(Tuplesortstate *state) * in the parent context, not this context, because there is no need to * free memtuples early. */ - state->tuplecontext = AllocSetContextCreate(state->sortcontext, - "Caller tuples", - ALLOCSET_DEFAULT_SIZES); + state->tuplecontext = GenerationContextCreate(state->sortcontext, + "Caller tuples", + ALLOCSET_DEFAULT_MAXSIZE); state->status = TSS_INITIAL; state->bounded = false;