Rewrite btree vacuuming to fold the former bulkdelete and cleanup operations
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 May 2006 00:00:17 +0000 (00:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 May 2006 00:00:17 +0000 (00:00 +0000)
commit5749f6ef0cc1c67ef9c9ad2108b3d97b82555c80
tree52e558881d33cde58c6643b3651a48aa196a17d6
parent09cb5c0e7d6fbc9dee26dc429e4fc0f2a88e5272
Rewrite btree vacuuming to fold the former bulkdelete and cleanup operations
into a single mostly-physical-order scan of the index.  This requires some
ticklish interlocking considerations, but should create no material
performance impact on normal index operations (at least given the
already-committed changes to make scans work a page at a time).  VACUUM
itself should get significantly faster in any index that's degenerated to a
very nonlinear page order.  Also, we save one pass over the index entirely,
except in the case where there were no deletions to do and so only one pass
happened anyway.

Original patch by Heikki Linnakangas, rework by Tom Lane.
src/backend/access/nbtree/README
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/nbtree/nbtxlog.c
src/backend/storage/ipc/ipci.c
src/include/access/nbtree.h
src/include/storage/lwlock.h