Second phase of psort reconstruction project: add bookkeeping logic to
Tom Lane <tgl@sss.pgh.pa.us>
Second phase of psort reconstruction project: add bookkeeping logic to recycle storage within sort temp file on a block-by-block basis. This reduces peak disk usage to essentially just the volume of data being sorted, whereas it had been about 4x the data volume before.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/file/buffile.c | modified | +108 −126 |
| src/backend/utils/sort/logtape.c | added | +903 −0 |
| src/backend/utils/sort/Makefile | modified | +2 −2 |
| src/backend/utils/sort/psort.c | modified | +232 −238 |
| src/include/storage/buffile.h | modified | +3 −2 |
| src/include/utils/logtape.h | added | +41 −0 |
| src/include/utils/psort.h | modified | +4 −84 |