Incorporate a couple of recent tuplesort.c improvements into tuplestore.c.
In particular, ensure that enlargement of the memtuples[] array doesn't fall foul of MaxAllocSize when work_mem is very large, and don't bother enlarging it if that would force an immediate switch into 'tape' mode anyway.
Showing
Please register or sign in to comment