mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
Redefine the lp_flags field of item pointers as having four states, rather
than two independent bits (one of which was never used in heap pages anyway, or at least hadn't been in a very long time). This gives us flexibility to add the HOT notions of redirected and dead item pointers without requiring anything so klugy as magic values of lp_off and lp_len. The state values are chosen so that for the states currently in use (pre-HOT) there is no change in the physical representation.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.94 2007/09/12 02:05:48 alvherre Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.95 2007/09/12 22:10:26 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -642,7 +642,7 @@ lazy_vacuum_page(Relation onerel, BlockNumber blkno, Buffer buffer,
|
||||
break; /* past end of tuples for this block */
|
||||
toff = ItemPointerGetOffsetNumber(&vacrelstats->dead_tuples[tupindex]);
|
||||
itemid = PageGetItemId(page, toff);
|
||||
itemid->lp_flags &= ~LP_USED;
|
||||
ItemIdSetUnused(itemid);
|
||||
}
|
||||
|
||||
uncnt = PageRepairFragmentation(page, unused);
|
||||
|
Reference in New Issue
Block a user