Extend the MinimalTuple concept to tuplesort.c, thereby reducing the
Tom Lane <tgl@sss.pgh.pa.us>
Extend the MinimalTuple concept to tuplesort.c, thereby reducing the per-tuple space overhead for sorts in memory. I chose to replace the previous patch that tried to write out the bare minimum amount of data when sorting on disk; instead, just dump the MinimalTuples as-is. This wastes 3 to 10 bytes per tuple depending on architecture and null-bitmap length, but the simplification in the writetup/readtup routines seems worth it.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/nbtree/nbtsort.c | modified | +2 −2 |
| src/backend/executor/nodeSort.c | modified | +6 −13 |
| src/backend/utils/sort/tuplesort.c | modified | +112 −120 |
| src/include/utils/tuplesort.h | modified | +19 −17 |