PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/xact.h"
#include "miscadmin.h"
#include "storage/proc.h"
#include "utils/xid8.h"
Go to the source code of this file.
Macros | |
#define | REPORT_INTERVAL (10 * 1000000) |
#define | COMMIT_TS_XACTS_PER_PAGE (BLCKSZ / 10) |
#define | SUBTRANS_XACTS_PER_PAGE (BLCKSZ / sizeof(TransactionId)) |
#define | CLOG_XACTS_PER_BYTE 4 |
#define | CLOG_XACTS_PER_PAGE (BLCKSZ * CLOG_XACTS_PER_BYTE) |
Functions | |
static int64 | consume_xids_shortcut (void) |
static FullTransactionId | consume_xids_common (FullTransactionId untilxid, uint64 nxids) |
PG_FUNCTION_INFO_V1 (consume_xids) | |
Datum | consume_xids (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (consume_xids_until) | |
Datum | consume_xids_until (PG_FUNCTION_ARGS) |
static uint32 | XidSkip (FullTransactionId fullxid) |
Variables | |
PG_MODULE_MAGIC | |
#define CLOG_XACTS_PER_BYTE 4 |
Definition at line 161 of file xid_wraparound.c.
#define CLOG_XACTS_PER_PAGE (BLCKSZ * CLOG_XACTS_PER_BYTE) |
Definition at line 162 of file xid_wraparound.c.
#define COMMIT_TS_XACTS_PER_PAGE (BLCKSZ / 10) |
Definition at line 159 of file xid_wraparound.c.
#define REPORT_INTERVAL (10 * 1000000) |
#define SUBTRANS_XACTS_PER_PAGE (BLCKSZ / sizeof(TransactionId)) |
Definition at line 160 of file xid_wraparound.c.
Datum consume_xids | ( | PG_FUNCTION_ARGS | ) |
Definition at line 32 of file xid_wraparound.c.
References consume_xids_common(), elog, ERROR, InvalidFullTransactionId, PG_GETARG_INT64, PG_RETURN_FULLTRANSACTIONID, and ReadNextFullTransactionId().
|
static |
Definition at line 71 of file xid_wraparound.c.
References CHECK_FOR_INTERRUPTS, consume_xids_shortcut(), elog, EpochFromFullTransactionId, FullTransactionIdFollowsOrEquals, GetNewTransactionId(), GetTopTransactionId(), MyProc, NOTICE, XidCacheStatus::overflowed, ReadNextFullTransactionId(), REPORT_INTERVAL, PGPROC::subxidStatus, U64FromFullTransactionId, and XidFromFullTransactionId.
Referenced by consume_xids(), and consume_xids_until().
|
static |
Definition at line 200 of file xid_wraparound.c.
References LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), TransamVariablesData::nextXid, TransamVariables, FullTransactionId::value, and XidSkip().
Referenced by consume_xids_common().
Datum consume_xids_until | ( | PG_FUNCTION_ARGS | ) |
Definition at line 53 of file xid_wraparound.c.
References consume_xids_common(), elog, ERROR, FullTransactionIdIsNormal, PG_GETARG_FULLTRANSACTIONID, PG_RETURN_FULLTRANSACTIONID, and U64FromFullTransactionId.
PG_FUNCTION_INFO_V1 | ( | consume_xids | ) |
PG_FUNCTION_INFO_V1 | ( | consume_xids_until | ) |
|
inlinestatic |
Definition at line 171 of file xid_wraparound.c.
References CLOG_XACTS_PER_PAGE, COMMIT_TS_XACTS_PER_PAGE, Min, SUBTRANS_XACTS_PER_PAGE, and XidFromFullTransactionId.
Referenced by consume_xids_shortcut().
PG_MODULE_MAGIC |
Definition at line 22 of file xid_wraparound.c.