39{
42
43 /*
44 * A tuple that's being inserted speculatively should already have its
45 * token set.
46 */
48
49 /*
50 * Do not allow tuples with invalid combinations of hint bits to be placed
51 * on a page. This combination is detected as corruption by the
52 * contrib/amcheck logic, so if you disable this assertion, make
53 * corresponding changes there.
54 */
57
58 /* Add the tuple to the page */
60
63
65 elog(
PANIC,
"failed to add tuple to page");
66
67 /* Update tuple->t_self to the actual position where it was stored */
69
70 /*
71 * Insert the correct position into CTID of the stored tuple, too (unless
72 * this is a speculative insertion, in which case the token is held in
73 * CTID field instead)
74 */
76 {
79
81 }
82}
BlockNumber BufferGetBlockNumber(Buffer buffer)
static Page BufferGetPage(Buffer buffer)
static Item PageGetItem(const PageData *page, const ItemIdData *itemId)
static ItemId PageGetItemId(Page page, OffsetNumber offsetNumber)
#define PageAddItem(page, item, size, offsetNumber, overwrite, is_heap)
Assert(PointerIsAligned(start, uint64))
HeapTupleHeaderData * HeapTupleHeader
#define HEAP_XMAX_IS_MULTI
#define HEAP_XMAX_COMMITTED
static bool HeapTupleHeaderIsSpeculative(const HeapTupleHeaderData *tup)
static void ItemPointerSet(ItemPointerData *pointer, BlockNumber blockNumber, OffsetNumber offNum)
#define InvalidOffsetNumber