pgrx_pg_sys::submodules::htup

Function HeapTupleHeaderGetRawXmin

Source
pub unsafe fn HeapTupleHeaderGetRawXmin(
    tup: *const HeapTupleHeaderData,
) -> TransactionId
Expand description

HeapTupleHeaderGetRawXmin returns the “raw” xmin field, which is the xid originally used to insert the tuple. However, the tuple might actually be frozen (via HeapTupleHeaderSetXminFrozen) in which case the tuple’s xmin is visible to every snapshot. Prior to PostgreSQL 9.4, we actually changed the xmin to FrozenTransactionId, and that value may still be encountered on disk.

§Safety

Caller must ensure tup is a valid HeapTupleHeaderData pointer