31 #define InvalidTransactionId ((TransactionId) 0)
32 #define BootstrapTransactionId ((TransactionId) 1)
33 #define FrozenTransactionId ((TransactionId) 2)
34 #define FirstNormalTransactionId ((TransactionId) 3)
35 #define MaxTransactionId ((TransactionId) 0xFFFFFFFF)
41 #define TransactionIdIsValid(xid) ((xid) != InvalidTransactionId)
42 #define TransactionIdIsNormal(xid) ((xid) >= FirstNormalTransactionId)
43 #define TransactionIdEquals(id1, id2) ((id1) == (id2))
44 #define TransactionIdStore(xid, dest) (*(dest) = (xid))
45 #define StoreInvalidTransactionId(dest) (*(dest) = InvalidTransactionId)
47 #define EpochFromFullTransactionId(x) ((uint32) ((x).value >> 32))
48 #define XidFromFullTransactionId(x) ((uint32) (x).value)
49 #define U64FromFullTransactionId(x) ((x).value)
50 #define FullTransactionIdEquals(a, b) ((a).value == (b).value)
51 #define FullTransactionIdPrecedes(a, b) ((a).value < (b).value)
52 #define FullTransactionIdPrecedesOrEquals(a, b) ((a).value <= (b).value)
53 #define FullTransactionIdFollows(a, b) ((a).value > (b).value)
54 #define FullTransactionIdFollowsOrEquals(a, b) ((a).value >= (b).value)
55 #define FullTransactionIdIsValid(x) TransactionIdIsValid(XidFromFullTransactionId(x))
56 #define InvalidFullTransactionId FullTransactionIdFromEpochAndXid(0, InvalidTransactionId)
57 #define FirstNormalFullTransactionId FullTransactionIdFromEpochAndXid(0, FirstNormalTransactionId)
58 #define FullTransactionIdIsNormal(x) FullTransactionIdFollowsOrEquals(x, FirstNormalFullTransactionId)
91 #define TransactionIdAdvance(dest) \
94 if ((dest) < FirstNormalTransactionId) \
95 (dest) = FirstNormalTransactionId; \
141 #define TransactionIdRetreat(dest) \
144 } while ((dest) < FirstNormalTransactionId)
147 #define NormalTransactionIdPrecedes(id1, id2) \
148 (AssertMacro(TransactionIdIsNormal(id1) && TransactionIdIsNormal(id2)), \
149 (int32) ((id1) - (id2)) < 0)
152 #define NormalTransactionIdFollows(id1, id2) \
153 (AssertMacro(TransactionIdIsNormal(id1) && TransactionIdIsNormal(id2)), \
154 (int32) ((id1) - (id2)) > 0)
195 #define FirstGenbkiObjectId 10000
196 #define FirstUnpinnedObjectId 12000
197 #define FirstNormalObjectId 16384
298 #ifdef USE_ASSERT_CHECKING
301 #define AssertTransactionIdInAllowableRange(xid) ((void)true)
#define Assert(condition)
TransactionId xidStopLimit
TransactionId oldestCommitTsXid
TransactionId newestCommitTsXid
TransactionId xidWarnLimit
TransactionId xidWrapLimit
FullTransactionId latestCompletedXid
FullTransactionId nextXid
TransactionId xidVacLimit
uint64 xactCompletionCount
TransactionId oldestClogXid
void TransactionIdAsyncCommitTree(TransactionId xid, int nxids, TransactionId *xids, XLogRecPtr lsn)
PGDLLIMPORT TransamVariablesData * TransamVariables
FullTransactionId ReadNextFullTransactionId(void)
void AdvanceNextFullTransactionIdPastXid(TransactionId xid)
static TransactionId ReadNextTransactionId(void)
static TransactionId TransactionIdRetreatedBy(TransactionId xid, uint32 amount)
static FullTransactionId FullTransactionIdNewer(FullTransactionId a, FullTransactionId b)
TransactionId TransactionIdLatest(TransactionId mainxid, int nxids, const TransactionId *xids)
static void FullTransactionIdRetreat(FullTransactionId *dest)
bool TransactionStartedDuringRecovery(void)
static FullTransactionId FullTransactionIdFromU64(uint64 value)
void SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid)
#define AssertTransactionIdInAllowableRange(xid)
bool TransactionIdDidCommit(TransactionId transactionId)
void TransactionIdCommitTree(TransactionId xid, int nxids, TransactionId *xids)
static TransactionId NormalTransactionIdOlder(TransactionId a, TransactionId b)
Size VarsupShmemSize(void)
FullTransactionId GetNewTransactionId(bool isSubXact)
#define NormalTransactionIdPrecedes(id1, id2)
void StopGeneratingPinnedObjectIds(void)
void TransactionIdAbortTree(TransactionId xid, int nxids, TransactionId *xids)
bool TransactionIdPrecedes(TransactionId id1, TransactionId id2)
bool ForceTransactionIdLimitUpdate(void)
#define FullTransactionIdFollows(a, b)
#define XidFromFullTransactionId(x)
bool TransactionIdPrecedesOrEquals(TransactionId id1, TransactionId id2)
bool TransactionIdDidAbort(TransactionId transactionId)
bool TransactionIdFollows(TransactionId id1, TransactionId id2)
XLogRecPtr TransactionIdGetCommitLSN(TransactionId xid)
void AdvanceOldestClogXid(TransactionId oldest_datfrozenxid)
#define FirstNormalTransactionId
static void FullTransactionIdAdvance(FullTransactionId *dest)
struct TransamVariablesData TransamVariablesData
#define TransactionIdIsValid(xid)
static FullTransactionId FullTransactionIdFromEpochAndXid(uint32 epoch, TransactionId xid)
struct FullTransactionId FullTransactionId
#define TransactionIdIsNormal(xid)
#define FirstNormalFullTransactionId
#define FullTransactionIdPrecedes(a, b)
#define FullTransactionIdIsValid(x)
static TransactionId TransactionIdOlder(TransactionId a, TransactionId b)
void VarsupShmemInit(void)
bool TransactionIdFollowsOrEquals(TransactionId id1, TransactionId id2)
static const unsigned __int64 epoch