mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +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:
@ -96,7 +96,7 @@
|
||||
* Portions Copyright (c) 1994-5, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/heap/rewriteheap.c,v 1.5 2007/05/17 15:28:29 alvherre Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/heap/rewriteheap.c,v 1.6 2007/09/12 22:10:26 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -628,7 +628,7 @@ raw_heap_insert(RewriteState state, HeapTuple tup)
|
||||
|
||||
/* And now we can insert the tuple into the page */
|
||||
newoff = PageAddItem(page, (Item) heaptup->t_data, len,
|
||||
InvalidOffsetNumber, LP_USED);
|
||||
InvalidOffsetNumber, false);
|
||||
if (newoff == InvalidOffsetNumber)
|
||||
elog(ERROR, "failed to add tuple");
|
||||
|
||||
|
Reference in New Issue
Block a user