Use truncate(2) where appropriate.
Thomas Munro <tmunro@postgresql.org>
Use truncate(2) where appropriate. When truncating files by name, use truncate(2). Windows hasn't got it, so keep our previous coding based on ftruncate(2) as a fallback. Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/file/fd.c | modified | +27 −0 |
| src/backend/storage/smgr/md.c | modified | +1 −12 |
| src/include/storage/fd.h | modified | +1 −0 |
Discussion
- BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted 21 messages · 2020-10-09 → 2020-12-01