mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.45 2007/05/03 16:45:58 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.46 2007/09/12 22:10:25 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -200,7 +200,7 @@ _hash_pgaddtup(Relation rel,
|
||||
page = BufferGetPage(buf);
|
||||
|
||||
itup_off = OffsetNumberNext(PageGetMaxOffsetNumber(page));
|
||||
if (PageAddItem(page, (Item) itup, itemsize, itup_off, LP_USED)
|
||||
if (PageAddItem(page, (Item) itup, itemsize, itup_off, false)
|
||||
== InvalidOffsetNumber)
|
||||
elog(ERROR, "failed to add index item to \"%s\"",
|
||||
RelationGetRelationName(rel));
|
||||
|
||||
Reference in New Issue
Block a user