38 elog(
ERROR,
"invalid nxids argument: %lld", (
long long) nxids);
59 elog(
ERROR,
"targetxid %llu is not normal",
74 uint64 last_reported_at = 0;
78 #define REPORT_INTERVAL (10 * 1000000)
103 if (consumed >= nxids)
105 xids_left = nxids - consumed;
118 if (xids_left > 2000 &&
124 if (consumed_by_shortcut > 0)
126 consumed += consumed_by_shortcut;
139 elog(
NOTICE,
"consumed %llu / %llu XIDs, latest %u:%u",
140 (
unsigned long long) consumed, (
unsigned long long) nxids,
149 last_reported_at = consumed;
159 #define COMMIT_TS_XACTS_PER_PAGE (BLCKSZ / 10)
160 #define SUBTRANS_XACTS_PER_PAGE (BLCKSZ / sizeof(TransactionId))
161 #define CLOG_XACTS_PER_BYTE 4
162 #define CLOG_XACTS_PER_PAGE (BLCKSZ * CLOG_XACTS_PER_BYTE)
177 if (low < 5 || low >= UINT32_MAX - 5)
179 distance = UINT32_MAX - 5 - low;
#define PG_GETARG_INT64(n)
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
void LWLockRelease(LWLock *lock)
#define CHECK_FOR_INTERRUPTS()
XidCacheStatus subxidStatus
FullTransactionId nextXid
#define FullTransactionIdIsNormal(x)
#define EpochFromFullTransactionId(x)
#define U64FromFullTransactionId(x)
#define FullTransactionIdFollowsOrEquals(a, b)
#define XidFromFullTransactionId(x)
#define InvalidFullTransactionId
FullTransactionId ReadNextFullTransactionId(void)
FullTransactionId GetNewTransactionId(bool isSubXact)
TransamVariablesData * TransamVariables
TransactionId GetTopTransactionId(void)
#define PG_GETARG_FULLTRANSACTIONID(X)
#define PG_RETURN_FULLTRANSACTIONID(X)
PG_FUNCTION_INFO_V1(consume_xids)
static uint32 XidSkip(FullTransactionId fullxid)
#define CLOG_XACTS_PER_PAGE
#define COMMIT_TS_XACTS_PER_PAGE
#define SUBTRANS_XACTS_PER_PAGE
Datum consume_xids_until(PG_FUNCTION_ARGS)
static FullTransactionId consume_xids_common(FullTransactionId untilxid, uint64 nxids)
Datum consume_xids(PG_FUNCTION_ARGS)
static int64 consume_xids_shortcut(void)