Use bump context for TID bitmaps stored by vacuum
John Naylor <john.naylor@postgresql.org>
Use bump context for TID bitmaps stored by vacuum Vacuum does not pfree individual entries, and only frees the entire storage space when finished with it. This allows using a bump context, eliminating the chunk header in each leaf allocation. Most leaf allocations will be 16 to 32 bytes, so that's a significant savings. TidStoreCreateLocal gets a boolean parameter to indicate that the created store is insert-only. This requires a separate tree context for iteration, since we free the iteration state after iteration completes. Discussion: https://postgr.es/m/CANWCAZac%3DpBePg3rhX8nXkUuaLoiAJJLtmnCfZsPEAS4EtJ%3Dkg%40mail.gmail.com Discussion: https://postgr.es/m/CANWCAZZQFfxvzO8yZHFWtQV+Z2gAMv1ku16Vu7KWmb5kZQyd1w@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/common/tidstore.c | modified | +13 −2 |
| src/backend/access/heap/vacuumlazy.c | modified | +2 −2 |
| src/include/access/tidstore.h | modified | +1 −1 |
| src/include/lib/radixtree.h | modified | +10 −1 |
| src/test/modules/test_tidstore/test_tidstore.c | modified | +2 −1 |
Discussion
- [PoC] Improve dead tuple storage for lazy vacuum 462 messages · 2021-07-07 → 2024-05-08