68#define UINT32_ACCESS_ONCE(var) ((uint32)(*((volatile uint32 *)&(var))))
312static long xc_by_recent_xmin = 0;
313static long xc_by_known_xact = 0;
314static long xc_by_my_xact = 0;
315static long xc_by_latest_xid = 0;
316static long xc_by_main_xid = 0;
317static long xc_by_child_xid = 0;
318static long xc_by_known_assigned = 0;
319static long xc_no_overflow = 0;
320static long xc_slow_answer = 0;
322#define xc_by_recent_xmin_inc() (xc_by_recent_xmin++)
323#define xc_by_known_xact_inc() (xc_by_known_xact++)
324#define xc_by_my_xact_inc() (xc_by_my_xact++)
325#define xc_by_latest_xid_inc() (xc_by_latest_xid++)
326#define xc_by_main_xid_inc() (xc_by_main_xid++)
327#define xc_by_child_xid_inc() (xc_by_child_xid++)
328#define xc_by_known_assigned_inc() (xc_by_known_assigned++)
329#define xc_no_overflow_inc() (xc_no_overflow++)
330#define xc_slow_answer_inc() (xc_slow_answer++)
332static void DisplayXidCache(
void);
335#define xc_by_recent_xmin_inc() ((void) 0)
336#define xc_by_known_xact_inc() ((void) 0)
337#define xc_by_my_xact_inc() ((void) 0)
338#define xc_by_latest_xid_inc() ((void) 0)
339#define xc_by_main_xid_inc() ((void) 0)
340#define xc_by_child_xid_inc() ((void) 0)
341#define xc_by_known_assigned_inc() ((void) 0)
342#define xc_no_overflow_inc() ((void) 0)
343#define xc_slow_answer_inc() ((void) 0)
349 bool exclusive_lock);
381#define PROCARRAY_MAXPROCS (MaxBackends + max_prepared_xacts)
399#define TOTAL_MAX_CACHED_SUBXIDS \
400 ((PGPROC_MAX_CACHED_SUBXIDS + 1) * PROCARRAY_MAXPROCS)
487 (
errcode(ERRCODE_TOO_MANY_CONNECTIONS),
488 errmsg(
"sorry, too many clients already")));
508 if (this_procno > pgprocno)
583 Assert(myoff >= 0 && myoff < arrayP->numProcs);
613 movecount = arrayP->
numProcs - myoff - 1;
841 while (extraWaits-- > 0)
1076 advanceNextXid = running->
nextXid;
1125 "recovery snapshots are now enabled");
1129 "recovery snapshot waiting for non-overflowed snapshot or "
1130 "until oldest active xid on standby is at least %u (now %u)",
1184 xids[nxids++] = xid;
1192 elog(
ERROR,
"KnownAssignedXids is not empty");
1211 for (
i = 0;
i < nxids;
i++)
1216 "found duplicated transaction %u for KnownAssignedXids insertion",
1304 elog(
DEBUG1,
"recovery snapshots are now enabled");
1307 "recovery snapshot waiting for non-overflowed snapshot or "
1308 "until oldest active xid on standby is at least %u (now %u)",
1349 for (
i = 0;
i < nsubxids;
i++)
1464 (
errcode(ERRCODE_OUT_OF_MEMORY),
1465 errmsg(
"out of memory")));
1477 latestCompletedXid =
1489 for (
int pgxactoff = 0; pgxactoff < numProcs; pgxactoff++)
1497 if (pgxactoff == mypgxactoff)
1526 pxids = other_subxidstates[pgxactoff].
count;
1528 pgprocno = arrayP->
pgprocnos[pgxactoff];
1530 for (
j = pxids - 1;
j >= 0;
j--)
1550 if (other_subxidstates[pgxactoff].overflowed)
1551 xids[nxids++] = pxid;
1636 bool result =
false;
1978 rel->
rd_rel->relkind == RELKIND_RELATION ||
1979 rel->
rd_rel->relkind == RELKIND_MATVIEW ||
1980 rel->
rd_rel->relkind == RELKIND_TOASTVALUE);
2097 uint64 curXactCompletionCount;
2137 snapshot->
copied =
false;
2183 bool suboverflowed =
false;
2188 uint64 curXactCompletionCount;
2193 Assert(snapshot != NULL);
2206 if (snapshot->
xip == NULL)
2214 if (snapshot->
xip == NULL)
2216 (
errcode(ERRCODE_OUT_OF_MEMORY),
2217 errmsg(
"out of memory")));
2221 if (snapshot->
subxip == NULL)
2223 (
errcode(ERRCODE_OUT_OF_MEMORY),
2224 errmsg(
"out of memory")));
2241 myxid = other_xids[mypgxactoff];
2273 for (
int pgxactoff = 0; pgxactoff < numProcs; pgxactoff++)
2293 if (pgxactoff == mypgxactoff)
2316 statusFlags = allStatusFlags[pgxactoff];
2344 if (subxidStates[pgxactoff].overflowed)
2345 suboverflowed =
true;
2348 int nsubxids = subxidStates[pgxactoff].
count;
2352 int pgprocno = pgprocnos[pgxactoff];
2357 memcpy(snapshot->
subxip + subcount,
2360 subcount += nsubxids;
2401 suboverflowed =
true;
2441 def_vis_xid = def_vis_xid_data;
2501 snapshot->
xmin = xmin;
2502 snapshot->
xmax = xmax;
2503 snapshot->
xcnt = count;
2516 snapshot->
copied =
false;
2535 bool result =
false;
2618 bool result =
false;
2717 if (CurrentRunningXacts->
xids == NULL)
2724 if (CurrentRunningXacts->
xids == NULL)
2726 (
errcode(ERRCODE_OUT_OF_MEMORY),
2727 errmsg(
"out of memory")));
2730 xids = CurrentRunningXacts->
xids;
2732 count = subcount = 0;
2733 suboverflowed =
false;
2742 latestCompletedXid =
2744 oldestDatabaseRunningXid = oldestRunningXid =
2770 oldestRunningXid = xid;
2783 oldestDatabaseRunningXid = xid;
2787 suboverflowed =
true;
2797 xids[count++] = xid;
2827 subcount += nsubxids;
2847 CurrentRunningXacts->
xcnt = count - subcount;
2848 CurrentRunningXacts->
subxcnt = subcount;
2861 return CurrentRunningXacts;
2915 oldestRunningXid = xid;
2925 return oldestRunningXid;
2995 if (!recovery_in_progress)
3013 oldestSafeXid = xid;
3019 return oldestSafeXid;
3069 vxids[count++] = vxid;
3091 bool result =
false;
3112 for (
i = 0;
i < nvxids;
i++)
3146 if (result->
pid == 0)
3168 *overflowed =
false;
3232 if (proc->
pid == pid)
3270 if (other_xids[
index] == xid)
3325 bool allDbs,
int excludeVacuum,
3348 if (excludeVacuum & statusFlags)
3370 vxids[count++] = vxid;
3435 (
errcode(ERRCODE_OUT_OF_MEMORY),
3436 errmsg(
"out of memory")));
3471 vxids[count++] = vxid;
3498 bool conflictPending)
3592 return count >= min;
3717 if (proc->
roleId == roleid)
3754#define MAXAUTOVACPIDS 10
3759 for (tries = 0; tries < 50; tries++)
3767 *nbackends = *nprepared = 0;
3791 autovac_pids[nautovacs++] = proc->
pid;
3807 (
void)
kill(autovac_pids[
index], SIGTERM);
3857 (
errcode(ERRCODE_OBJECT_IN_USE),
3858 errmsg(
"database \"%s\" is being used by prepared transactions",
3861 "There are %d prepared transactions using the database.",
3893 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
3894 errmsg(
"permission denied to terminate process"),
3895 errdetail(
"Only roles with the %s attribute may terminate processes of roles with the %s attribute.",
3896 "SUPERUSER",
"SUPERUSER")));
3901 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
3902 errmsg(
"permission denied to terminate process"),
3903 errdetail(
"Only roles with privileges of the role whose process is being terminated or with privileges of the \"%s\" role may terminate this process.",
3904 "pg_signal_backend")));
3926 (void)
kill(-pid, SIGTERM);
3928 (void)
kill(pid, SIGTERM);
3944 bool already_locked)
3948 if (!already_locked)
3954 if (!already_locked)
3957 elog(
DEBUG1,
"xmin required by slots: data %u, catalog %u",
3958 xmin, catalog_xmin);
3976 if (catalog_xmin != NULL)
4022 for (
i = nxids - 1;
i >= 0;
i--)
4032 mysubxidstat->
count--;
4045 if (j < 0 && !MyProc->subxidStatus.overflowed)
4046 elog(
WARNING,
"did not find subXID %u in MyProc", anxid);
4055 mysubxidstat->
count--;
4061 if (j < 0 && !MyProc->subxidStatus.overflowed)
4062 elog(
WARNING,
"did not find subXID %u in MyProc", xid);
4073#ifdef XIDCACHE_DEBUG
4079DisplayXidCache(
void)
4082 "XidCache: xmin: %ld, known: %ld, myxact: %ld, latest: %ld, mainxid: %ld, childxid: %ld, knownassigned: %ld, nooflo: %ld, slow: %ld\n",
4089 xc_by_known_assigned,
4158 state->definitely_needed))
4332 + (
int32) (xid - rel_xid));
4409 elog(
DEBUG4,
"record known xact %u latestObservedXid %u",
4436 Assert(next_expected_xid == xid);
4651 static unsigned int transactionEndsCounter;
4655#define KAX_COMPRESS_FREQUENCY 128
4656#define KAX_COMPRESS_IDLE_INTERVAL 1000
4664 nelements = head - tail;
4695 if (nelements < 2 * pArray->numKnownAssignedXids)
4705 if (lastCompressTs != 0)
4725 for (
i = tail;
i < head;
i++)
4759 bool exclusive_lock)
4775 if (to_xid >= from_xid)
4776 nxids = to_xid - from_xid + 1;
4780 next_xid = from_xid;
4795 Assert(head >= 0 && head <= pArray->maxKnownAssignedXids);
4796 Assert(tail >= 0 && tail < pArray->maxKnownAssignedXids);
4807 elog(
ERROR,
"out-of-order XID insertion in KnownAssignedXids");
4824 elog(
ERROR,
"too many KnownAssignedXids");
4828 next_xid = from_xid;
4829 for (
i = 0;
i < nxids;
i++)
4846 if (!exclusive_lock)
4869 int result_index = -1;
4887 while (first <= last)
4892 mid_index = (first + last) / 2;
4897 result_index = mid_index;
4901 last = mid_index - 1;
4903 first = mid_index + 1;
4906 if (result_index < 0)
4923 if (result_index == tail)
4967 elog(
DEBUG4,
"remove KnownAssignedXid %u", xid);
4997 for (
i = 0;
i < nsubxids;
i++)
5021 elog(
DEBUG4,
"removing all KnownAssignedXids");
5027 elog(
DEBUG4,
"prune KnownAssignedXids to %u", removeXid);
5036 for (
i = tail;
i < head;
i++)
5059 for (
i = tail;
i < head;
i++)
5123 for (
i = tail;
i < head;
i++)
5147 xarray[count++] = knownXid;
5173 for (
i = tail;
i < head;
i++)
5208 for (
i = tail;
i < head;
i++)
5217 elog(trace_level,
"%d KnownAssignedXids (num=%d tail=%d head=%d) %s",
bool has_privs_of_role(Oid member, Oid role)
static bool pg_atomic_compare_exchange_u32(volatile pg_atomic_uint32 *ptr, uint32 *expected, uint32 newval)
#define pg_read_barrier()
#define pg_write_barrier()
static void pg_atomic_write_u32(volatile pg_atomic_uint32 *ptr, uint32 val)
static uint32 pg_atomic_read_u32(volatile pg_atomic_uint32 *ptr)
static uint32 pg_atomic_exchange_u32(volatile pg_atomic_uint32 *ptr, uint32 newval)
TimestampTz GetCurrentTimestamp(void)
#define Assert(condition)
#define FLEXIBLE_ARRAY_MEMBER
#define OidIsValid(objectId)
bool IsCatalogRelation(Relation relation)
#define fprintf(file, fmt, msg)
char * get_database_name(Oid dbid)
int errdetail(const char *fmt,...)
int errdetail_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
List * lappend_int(List *list, int datum)
#define VirtualTransactionIdIsValid(vxid)
#define GET_VXID_FROM_PGPROC(vxid_dst, proc)
#define InvalidLocalTransactionId
#define VirtualTransactionIdEquals(vxid1, vxid2)
bool LWLockHeldByMe(LWLock *lock)
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
bool LWLockHeldByMeInMode(LWLock *lock, LWLockMode mode)
void LWLockRelease(LWLock *lock)
bool LWLockConditionalAcquire(LWLock *lock, LWLockMode mode)
void pfree(void *pointer)
#define AmStartupProcess()
#define IsBootstrapProcessingMode()
#define CHECK_FOR_INTERRUPTS()
static bool pg_lfind32(uint32 key, const uint32 *base, uint32 nelem)
#define qsort(a, b, c, d)
void PGSemaphoreUnlock(PGSemaphore sema)
void PGSemaphoreLock(PGSemaphore sema)
#define PROC_IN_LOGICAL_DECODING
#define NUM_AUXILIARY_PROCS
#define PROC_AFFECTS_ALL_HORIZONS
#define GetPGProcByNumber(n)
#define GetNumberFromPGProc(proc)
#define PROC_VACUUM_STATE_MASK
#define PROC_IS_AUTOVACUUM
@ KAX_STARTUP_PROCESS_IDLE
static GlobalVisState GlobalVisDataRels
bool GlobalVisTestIsRemovableFullXid(GlobalVisState *state, FullTransactionId fxid)
TransactionId GetOldestNonRemovableTransactionId(Relation rel)
#define TOTAL_MAX_CACHED_SUBXIDS
static GlobalVisState GlobalVisSharedRels
void ProcArrayGetReplicationSlotXmin(TransactionId *xmin, TransactionId *catalog_xmin)
static GlobalVisState GlobalVisCatalogRels
VirtualTransactionId * GetCurrentVirtualXIDs(TransactionId limitXmin, bool excludeXmin0, bool allDbs, int excludeVacuum, int *nvxids)
bool GlobalVisTestIsRemovableXid(GlobalVisState *state, TransactionId xid)
bool GlobalVisCheckRemovableFullXid(Relation rel, FullTransactionId fxid)
static void KnownAssignedXidsCompress(KAXCompressReason reason, bool haveLock)
pid_t SignalVirtualTransaction(VirtualTransactionId vxid, ProcSignalReason sigmode, bool conflictPending)
Size ProcArrayShmemSize(void)
TransactionId GetOldestSafeDecodingTransactionId(bool catalogOnly)
void XidCacheRemoveRunningXids(TransactionId xid, int nxids, const TransactionId *xids, TransactionId latestXid)
bool TransactionIdIsActive(TransactionId xid)
static FullTransactionId FullXidRelativeTo(FullTransactionId rel, TransactionId xid)
bool MinimumActiveBackends(int min)
void TerminateOtherDBBackends(Oid databaseId)
#define xc_no_overflow_inc()
static TransactionId standbySnapshotPendingXmin
void ExpireAllKnownAssignedTransactionIds(void)
#define UINT32_ACCESS_ONCE(var)
RunningTransactions GetRunningTransactionData(void)
TransactionId GetOldestActiveTransactionId(void)
static void KnownAssignedXidsRemoveTree(TransactionId xid, int nsubxids, TransactionId *subxids)
static int KnownAssignedXidsGetAndSetXmin(TransactionId *xarray, TransactionId *xmin, TransactionId xmax)
#define xc_by_recent_xmin_inc()
void ProcArrayEndTransaction(PGPROC *proc, TransactionId latestXid)
void ProcNumberGetTransactionIds(ProcNumber procNumber, TransactionId *xid, TransactionId *xmin, int *nsubxid, bool *overflowed)
void RecordKnownAssignedTransactionIds(TransactionId xid)
static int KnownAssignedXidsGet(TransactionId *xarray, TransactionId xmax)
TransactionId GetOldestTransactionIdConsideredRunning(void)
static TransactionId latestObservedXid
static ProcArrayStruct * procArray
int GetMaxSnapshotSubxidCount(void)
int CountDBConnections(Oid databaseid)
static GlobalVisState GlobalVisTempRels
#define xc_by_my_xact_inc()
#define xc_by_known_assigned_inc()
struct ProcArrayStruct ProcArrayStruct
void CancelDBBackends(Oid databaseid, ProcSignalReason sigmode, bool conflictPending)
#define PROCARRAY_MAXPROCS
void GetReplicationHorizons(TransactionId *xmin, TransactionId *catalog_xmin)
static bool GlobalVisTestShouldUpdate(GlobalVisState *state)
static void ProcArrayEndTransactionInternal(PGPROC *proc, TransactionId latestXid)
static void KnownAssignedXidsRemovePreceding(TransactionId removeXid)
void ProcArrayAdd(PGPROC *proc)
struct ComputeXidHorizonsResult ComputeXidHorizonsResult
static TransactionId * KnownAssignedXids
#define xc_by_child_xid_inc()
pid_t CancelVirtualTransaction(VirtualTransactionId vxid, ProcSignalReason sigmode)
Snapshot GetSnapshotData(Snapshot snapshot)
static bool * KnownAssignedXidsValid
bool HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, int nvxids, int type)
static void KnownAssignedXidsRemove(TransactionId xid)
void KnownAssignedTransactionIdsIdleMaintenance(void)
static void GlobalVisUpdateApply(ComputeXidHorizonsResult *horizons)
int GetMaxSnapshotXidCount(void)
int CountDBBackends(Oid databaseid)
PGPROC * BackendPidGetProcWithLock(int pid)
bool GlobalVisCheckRemovableXid(Relation rel, TransactionId xid)
PGPROC * BackendPidGetProc(int pid)
bool ProcArrayInstallRestoredXmin(TransactionId xmin, PGPROC *proc)
PGPROC * ProcNumberGetProc(ProcNumber procNumber)
#define KAX_COMPRESS_FREQUENCY
GlobalVisState * GlobalVisTestFor(Relation rel)
static TransactionId KnownAssignedXidsGetOldestXmin(void)
void ProcArrayApplyRecoveryInfo(RunningTransactions running)
void ProcArrayClearTransaction(PGPROC *proc)
int CountUserBackends(Oid roleid)
static TransactionId ComputeXidHorizonsResultLastXmin
static void GlobalVisUpdate(void)
#define xc_slow_answer_inc()
static void KnownAssignedXidsDisplay(int trace_level)
#define xc_by_main_xid_inc()
static void MaintainLatestCompletedXidRecovery(TransactionId latestXid)
static void ComputeXidHorizons(ComputeXidHorizonsResult *h)
void ProcArrayApplyXidAssignment(TransactionId topxid, int nsubxids, TransactionId *subxids)
static bool KnownAssignedXidExists(TransactionId xid)
void ProcArrayShmemInit(void)
bool CountOtherDBBackends(Oid databaseId, int *nbackends, int *nprepared)
int BackendXidGetPid(TransactionId xid)
#define xc_by_latest_xid_inc()
bool IsBackendPid(int pid)
#define xc_by_known_xact_inc()
static bool KnownAssignedXidsSearch(TransactionId xid, bool remove)
static void KnownAssignedXidsReset(void)
static GlobalVisHorizonKind GlobalVisHorizonKindForRel(Relation rel)
void ProcArraySetReplicationSlotXmin(TransactionId xmin, TransactionId catalog_xmin, bool already_locked)
void ProcArrayInitRecovery(TransactionId initializedUptoXID)
void ProcArrayRemove(PGPROC *proc, TransactionId latestXid)
#define KAX_COMPRESS_IDLE_INTERVAL
VirtualTransactionId * GetConflictingVirtualXIDs(TransactionId limitXmin, Oid dbOid)
static void MaintainLatestCompletedXid(TransactionId latestXid)
static void ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid)
void ExpireTreeKnownAssignedTransactionIds(TransactionId xid, int nsubxids, TransactionId *subxids, TransactionId max_xid)
VirtualTransactionId * GetVirtualXIDsDelayingChkpt(int *nvxids, int type)
static TransactionId cachedXidIsNotInProgress
bool ProcArrayInstallImportedXmin(TransactionId xmin, VirtualTransactionId *sourcevxid)
static bool GetSnapshotDataReuse(Snapshot snapshot)
static void KnownAssignedXidsAdd(TransactionId from_xid, TransactionId to_xid, bool exclusive_lock)
bool TransactionIdIsInProgress(TransactionId xid)
void ExpireOldKnownAssignedTransactionIds(TransactionId xid)
#define INVALID_PROC_NUMBER
int SendProcSignal(pid_t pid, ProcSignalReason reason, ProcNumber procNumber)
#define RELATION_IS_LOCAL(relation)
#define RelationIsAccessibleInLogicalDecoding(relation)
Size add_size(Size s1, Size s2)
Size mul_size(Size s1, Size s2)
void * ShmemInitStruct(const char *name, Size size, bool *foundPtr)
void pg_usleep(long microsec)
static pg_noinline void Size size
TransactionId TransactionXmin
void StandbyReleaseOldLocks(TransactionId oldxid)
void appendStringInfo(StringInfo str, const char *fmt,...)
void initStringInfo(StringInfo str)
TransactionId slot_catalog_xmin
TransactionId data_oldest_nonremovable
TransactionId temp_oldest_nonremovable
TransactionId shared_oldest_nonremovable
TransactionId oldest_considered_running
FullTransactionId latest_completed
TransactionId catalog_oldest_nonremovable
TransactionId shared_oldest_nonremovable_raw
FullTransactionId definitely_needed
FullTransactionId maybe_needed
bool procArrayGroupMember
pg_atomic_uint32 procArrayGroupNext
bool recoveryConflictPending
XidCacheStatus subxidStatus
TransactionId procArrayGroupMemberXid
XidCacheStatus * subxidStates
pg_atomic_uint32 procArrayGroupFirst
TransactionId replication_slot_xmin
TransactionId replication_slot_catalog_xmin
int pgprocnos[FLEXIBLE_ARRAY_MEMBER]
TransactionId lastOverflowedXid
int tailKnownAssignedXids
int headKnownAssignedXids
TransactionId oldestRunningXid
TransactionId oldestDatabaseRunningXid
TransactionId latestCompletedXid
subxids_array_status subxid_status
uint64 snapXactCompletionCount
FullTransactionId latestCompletedXid
FullTransactionId nextXid
uint64 xactCompletionCount
LocalTransactionId localTransactionId
TransactionId xids[PGPROC_MAX_CACHED_SUBXIDS]
void SubTransSetParent(TransactionId xid, TransactionId parent)
TransactionId SubTransGetTopmostTransaction(TransactionId xid)
void ExtendSUBTRANS(TransactionId newestXact)
bool superuser_arg(Oid roleid)
TransactionId TransactionIdLatest(TransactionId mainxid, int nxids, const TransactionId *xids)
bool TransactionIdDidCommit(TransactionId transactionId)
bool TransactionIdPrecedes(TransactionId id1, TransactionId id2)
bool TransactionIdPrecedesOrEquals(TransactionId id1, TransactionId id2)
bool TransactionIdDidAbort(TransactionId transactionId)
bool TransactionIdFollows(TransactionId id1, TransactionId id2)
bool TransactionIdFollowsOrEquals(TransactionId id1, TransactionId id2)
#define FullTransactionIdIsNormal(x)
static FullTransactionId FullTransactionIdNewer(FullTransactionId a, FullTransactionId b)
#define TransactionIdRetreat(dest)
#define InvalidTransactionId
#define U64FromFullTransactionId(x)
static FullTransactionId FullTransactionIdFromU64(uint64 value)
#define FullTransactionIdFollowsOrEquals(a, b)
#define AssertTransactionIdInAllowableRange(xid)
#define TransactionIdEquals(id1, id2)
#define NormalTransactionIdPrecedes(id1, id2)
#define XidFromFullTransactionId(x)
static void FullTransactionIdAdvance(FullTransactionId *dest)
#define TransactionIdIsValid(xid)
#define TransactionIdIsNormal(xid)
#define TransactionIdAdvance(dest)
#define FullTransactionIdPrecedes(a, b)
#define FullTransactionIdIsValid(x)
static TransactionId TransactionIdOlder(TransactionId a, TransactionId b)
bool StandbyTransactionIdIsPrepared(TransactionId xid)
#define TimestampTzPlusMilliseconds(tz, ms)
void AdvanceNextFullTransactionIdPastXid(TransactionId xid)
TransamVariablesData * TransamVariables
static void pgstat_report_wait_start(uint32 wait_event_info)
static void pgstat_report_wait_end(void)
bool TransactionIdIsCurrentTransactionId(TransactionId xid)
CommandId GetCurrentCommandId(bool used)
int xidLogicalComparator(const void *arg1, const void *arg2)
bool RecoveryInProgress(void)
HotStandbyState standbyState
@ STANDBY_SNAPSHOT_PENDING