Prevent sorting from requesting a SortTuple array that exceeds MaxAllocSize;
Tom Lane <tgl@sss.pgh.pa.us>
Prevent sorting from requesting a SortTuple array that exceeds MaxAllocSize; we'll go over to disk-based sort if we reach that limit. This fixes Stefan Kaltenbrunner's observation that sorting can suffer an 'invalid memory alloc request size' failure when sort_mem is set large enough. It's unfortunately not so easy to fix in 8.1 ...
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/sort/tuplesort.c | modified | +8 −1 |