Optimize vacuuming of relations with no indexes.
Robert Haas <rhaas@postgresql.org>
Optimize vacuuming of relations with no indexes. If there are no indexes on a relation, items can be marked LP_UNUSED instead of LP_DEAD when pruning. This significantly reduces WAL volume, since we no longer need to emit one WAL record for pruning and a second to change the LP_DEAD line pointers thus created to LP_UNUSED. Melanie Plageman, reviewed by Andres Freund, Peter Geoghegan, and me Discussion: https://postgr.es/m/CAAKRu_bgvb_k0gKOXWzNKWHt560R0smrGe3E8zewKPs8fiMKkw%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/pruneheap.c | modified | +68 −12 |
| src/backend/access/heap/vacuumlazy.c | modified | +39 −90 |
| src/include/access/heapam.h | modified | +1 −0 |
Discussion
- Emit fewer vacuum records by reaping removable tuples during pruning 103 messages · 2023-11-13 → 2024-01-26