#include "postgres.h"
#include "access/transam.h"
#include "access/xact.h"
#include "funcapi.h"
#include "lib/qunique.h"
#include "libpq/pqformat.h"
#include "miscadmin.h"
#include "storage/lwlock.h"
#include "storage/procarray.h"
#include "storage/procnumber.h"
#include "utils/builtins.h"
#include "utils/memutils.h"
#include "utils/snapmgr.h"
#include "utils/xid8.h"
Go to the source code of this file.
Definition at line 72 of file xid8funcs.c.
Definition at line 70 of file xid8funcs.c.
Definition at line 48 of file xid8funcs.c.
Definition at line 237 of file xid8funcs.c.
References appendBinaryStringInfo(), buf, and pg_snapshot::nxip.
Referenced by parse_snapshot().
Definition at line 248 of file xid8funcs.c.
References buf, pfree(), and SET_VARSIZE().
Referenced by parse_snapshot().
Definition at line 222 of file xid8funcs.c.
References appendBinaryStringInfo(), buf, makeStringInfo(), pg_snapshot::nxip, PG_SNAPSHOT_SIZE, pg_snapshot::xmax, and pg_snapshot::xmin.
Referenced by parse_snapshot().
Definition at line 153 of file xid8funcs.c.
References a, b, and FullTransactionIdPrecedes.
Referenced by is_visible_fxid(), and sort_snapshot().
Definition at line 187 of file xid8funcs.c.
References cmp_fxid(), false, FullTransactionIdEquals, FullTransactionIdPrecedes, i, pg_snapshot::nxip, USE_BSEARCH_IF_NXIP_GREATER, value, pg_snapshot::xip, pg_snapshot::xmax, and pg_snapshot::xmin.
Referenced by pg_visible_in_snapshot().
Definition at line 265 of file xid8funcs.c.
References buf, buf_add_txid(), buf_finalize(), buf_init(), ereturn, errcode(), errmsg(), FullTransactionIdEquals, FullTransactionIdFollowsOrEquals, FullTransactionIdFromU64(), FullTransactionIdIsValid, FullTransactionIdPrecedes, InvalidFullTransactionId, str, and val.
Referenced by pg_snapshot_in().
Definition at line 370 of file xid8funcs.c.
References cur, elog, ERROR, FullTransactionIdFromAllowableAt(), GetActiveSnapshot(), i, pg_snapshot::nxip, palloc(), PG_RETURN_POINTER, PG_SNAPSHOT_SIZE, ReadNextFullTransactionId(), SET_VARSIZE(), sort_snapshot(), pg_snapshot::xip, pg_snapshot::xmax, and pg_snapshot::xmin.
Definition at line 334 of file xid8funcs.c.
References GetTopFullTransactionId(), PG_RETURN_FULLTRANSACTIONID, and PreventCommandDuringRecovery().
Definition at line 352 of file xid8funcs.c.
References FullTransactionIdIsValid, GetTopFullTransactionIdIfAny(), PG_RETURN_FULLTRANSACTIONID, and PG_RETURN_NULL.
Definition at line 420 of file xid8funcs.c.
References parse_snapshot(), PG_GETARG_CSTRING, PG_RETURN_POINTER, and str.
Definition at line 436 of file xid8funcs.c.
References appendStringInfo(), appendStringInfoChar(), i, initStringInfo(), pg_snapshot::nxip, PG_GETARG_VARLENA_P, PG_RETURN_CSTRING, str, U64FromFullTransactionId, UINT64_FORMAT, pg_snapshot::xip, pg_snapshot::xmax, and pg_snapshot::xmin.
Definition at line 468 of file xid8funcs.c.
References buf, cur, ereport, errcode(), errmsg(), ERROR, FullTransactionIdEquals, FullTransactionIdFromU64(), FullTransactionIdIsValid, FullTransactionIdPrecedes, i, InvalidFullTransactionId, pg_snapshot::nxip, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, PG_SNAPSHOT_MAX_NXIP, PG_SNAPSHOT_SIZE, pq_getmsgint(), pq_getmsgint64(), SET_VARSIZE(), pg_snapshot::xip, pg_snapshot::xmax, and pg_snapshot::xmin.
Definition at line 534 of file xid8funcs.c.
References buf, i, pg_snapshot::nxip, PG_GETARG_VARLENA_P, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendint32(), pq_sendint64(), U64FromFullTransactionId, pg_snapshot::xip, pg_snapshot::xmax, and pg_snapshot::xmin.
Definition at line 595 of file xid8funcs.c.
References arg, FuncCallContext::call_cntr, FullTransactionIdGetDatum(), MemoryContextAlloc(), FuncCallContext::multi_call_memory_ctx, pg_snapshot::nxip, PG_GETARG_VARLENA_P, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, FuncCallContext::user_fctx, value, VARSIZE(), and pg_snapshot::xip.
Definition at line 582 of file xid8funcs.c.
References PG_GETARG_VARLENA_P, PG_RETURN_FULLTRANSACTIONID, and pg_snapshot::xmax.
Definition at line 569 of file xid8funcs.c.
References PG_GETARG_VARLENA_P, PG_RETURN_FULLTRANSACTIONID, and pg_snapshot::xmin.
Definition at line 555 of file xid8funcs.c.
References is_visible_fxid(), PG_GETARG_FULLTRANSACTIONID, PG_GETARG_VARLENA_P, PG_RETURN_BOOL, and value.
Definition at line 640 of file xid8funcs.c.
References Assert(), cstring_to_text(), LW_SHARED, LWLockAcquire(), LWLockRelease(), PG_GETARG_FULLTRANSACTIONID, PG_RETURN_NULL, PG_RETURN_TEXT_P, TransactionIdDidCommit(), TransactionIdInRecentPast(), TransactionIdIsInProgress(), and TransactionIdIsValid.
Definition at line 173 of file xid8funcs.c.
References cmp_fxid(), pg_snapshot::nxip, qsort, qunique(), and pg_snapshot::xip.
Referenced by pg_current_snapshot().
Definition at line 97 of file xid8funcs.c.
References Assert(), ereport, errcode(), errmsg(), ERROR, FullTransactionIdFromAllowableAt(), FullTransactionIdPrecedes, LWLockHeldByMe(), TransamVariablesData::oldestClogXid, ReadNextFullTransactionId(), TransactionIdIsNormal, TransactionIdIsValid, TransamVariables, U64FromFullTransactionId, and XidFromFullTransactionId.
Referenced by pg_xact_status().