Modify btree to delete known-dead index entries without an actual VACUUM.
Tom Lane <tgl@sss.pgh.pa.us>
Modify btree to delete known-dead index entries without an actual VACUUM. When we are about to split an index page to do an insertion, first look to see if any entries marked LP_DELETE exist on the page, and if so remove them to try to make enough space for the desired insert. This should reduce index bloat in heavily-updated tables, although of course you still need VACUUM eventually to clean up the heap. Junji Teramoto
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/nbtree/nbtinsert.c | modified | +73 −8 |
| src/backend/access/nbtree/nbtpage.c | modified | +10 −1 |
| src/backend/access/nbtree/nbtutils.c | modified | +7 −1 |
| src/backend/access/nbtree/nbtxlog.c | modified | +9 −1 |
| src/backend/access/nbtree/README | modified | +42 −4 |
| src/include/access/nbtree.h | modified | +3 −1 |