Re: 64-bit XIDs in deleted nbtree pages
Peter Geoghegan <pg@bowt.ie>
Attachments
- v4-0002-Recycle-pages-deleted-during-same-VACUUM.patch (application/octet-stream) patch v4-0002
- v4-0001-Use-full-64-bit-XID-for-nbtree-page-deletion.patch (application/octet-stream) patch v4-0001
- v4-0003-Add-pages_newly_deleted-to-VACUUM-VERBOSE.patch (application/octet-stream) patch v4-0003
On Sat, Feb 13, 2021 at 10:47 PM Peter Geoghegan <pg@bowt.ie> wrote: > It will be rare. But more importantly, the fact that scenario is now > an extreme case justifies treating it as an extreme case. We can teach > _bt_vacuum_needs_cleanup() to recognize it as an extreme case, too. In > particular, I think that it will now be okay to increase the threshold > applied when considering deleted pages inside > _bt_vacuum_needs_cleanup(). It was 2.5% of the index size in v3 of the > patch. But in v4, which has the new recycling enhancement, I think > that it would be sensible to make it 5%, or maybe even 10%. This > naturally makes Masahiko's problem scenario unlikely to actually > result in a truly wasted call to btvacuumscan(). Attached is v4, which has the "recycle pages that we ourselves deleted during this same VACUUM operation" enhancement. It also doubles the _bt_vacuum_needs_cleanup() threshold applied to deleted pages -- it goes from 2.5% to 5%. The new patch is the patch series (v4-0002-*) certainly needs more polishing. I'm posting what I have now because v3 has bitrot. Benchmarking has shown that the enhancement in v4-0002-* can significantly reduce the amount of index bloat in two of the BenchmarkSQL/TPC-C indexes. -- Peter Geoghegan
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Recycle nbtree pages deleted during same VACUUM.
- 9dd963ae2534 14.0 landed
-
VACUUM VERBOSE: Count "newly deleted" index pages.
- 237636183909 14.0 landed
-
Use full 64-bit XIDs in deleted nbtree pages.
- e5d8a9990304 14.0 landed
-
Fix nbtree cleanup-only VACUUM stats inaccuracies.
- 48e1291342dd 14.0 cited
-
Fix undercounting in VACUUM VERBOSE output.
- 73a076b03f1c 13.0 cited
-
Delete empty pages in each pass during GIST VACUUM.
- 4e514c6180fb 13.0 cited
-
Use full 64-bit XID for checking if a deleted GiST page is old enough.
- 6655a7299d83 13.0 cited
-
Allow VACUUM to be run with index cleanup disabled.
- a96c41feec6b 12.0 cited
-
Skip full index scan during cleanup of B-tree indexes when possible
- 857f9c36cda5 11.0 cited
-
Do index FSM vacuuming sooner.
- c79f6df75dd3 11.0 cited
-
Avoid early reuse of btree pages, causing incorrect query results.
- d3abbbebe52e 9.2.0 cited
-
Clean up API for ambulkdelete/amvacuumcleanup as per today's discussion.
- e57345975cf8 8.2.0 cited