Final stage of psort reconstruction work: replace psort.c with
Tom Lane <tgl@sss.pgh.pa.us>
Final stage of psort reconstruction work: replace psort.c with a generalized module 'tuplesort.c' that can sort either HeapTuples or IndexTuples, and is not tied to execution of a Sort node. Clean up memory leakages in sorting, and replace nbtsort.c's private implementation of mergesorting with calls to tuplesort.c.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/nbtree/nbtree.c | modified | +14 −16 |
| src/backend/access/nbtree/nbtsort.c | modified | +89 −911 |
| src/backend/executor/nodeSort.c | modified | +90 −63 |
| src/backend/utils/sort/logtape.c | modified | +4 −4 |
| src/backend/utils/sort/Makefile | modified | +2 −2 |
| src/backend/utils/sort/tuplesort.c | added | +1465 −0 |
| src/include/access/nbtree.h | modified | +8 −5 |
| src/include/nodes/execnodes.h | modified | +6 −14 |
| src/include/nodes/plannodes.h | modified | +1 −3 |
| src/include/utils/tuplesort.h | added | +68 −0 |