PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
Size | SInvalShmemSize (void) |
void | CreateSharedInvalidationState (void) |
void | SharedInvalBackendInit (bool sendOnly) |
PGPROC * | BackendIdGetProc (int backendID) |
void | BackendIdGetTransactionIds (int backendID, TransactionId *xid, TransactionId *xmin, int *nsubxid, bool *overflowed) |
void | SIInsertDataEntries (const SharedInvalidationMessage *data, int n) |
int | SIGetDataEntries (SharedInvalidationMessage *data, int datasize) |
void | SICleanupQueue (bool callerHasWriteLock, int minFree) |
LocalTransactionId | GetNextLocalTransactionId (void) |
PGPROC* BackendIdGetProc | ( | int | backendID | ) |
Definition at line 385 of file sinvaladt.c.
References LW_SHARED, LWLockAcquire(), LWLockRelease(), ProcState::proc, SISeg::procState, and shmInvalBuffer.
Referenced by checkTempNamespaceStatus(), LogRecoveryConflict(), VirtualXactLock(), WaitForLockersMultiple(), and WaitForOlderSnapshots().
void BackendIdGetTransactionIds | ( | int | backendID, |
TransactionId * | xid, | ||
TransactionId * | xmin, | ||
int * | nsubxid, | ||
bool * | overflowed | ||
) |
Definition at line 412 of file sinvaladt.c.
References XidCacheStatus::count, InvalidTransactionId, LW_SHARED, LWLockAcquire(), LWLockRelease(), XidCacheStatus::overflowed, ProcState::proc, SISeg::procState, shmInvalBuffer, PGPROC::subxidStatus, PGPROC::xid, and PGPROC::xmin.
Referenced by pgstat_read_current_status().
void CreateSharedInvalidationState | ( | void | ) |
Definition at line 227 of file sinvaladt.c.
References CLEANUP_MIN, ProcState::hasMessages, i, InvalidLocalTransactionId, SISeg::lastBackend, SISeg::maxBackends, MaxBackends, SISeg::maxMsgNum, SISeg::minMsgNum, SISeg::msgnumLock, ProcState::nextLXID, ProcState::nextMsgNum, SISeg::nextThreshold, ProcState::proc, ProcState::procPid, SISeg::procState, ProcState::resetState, ShmemInitStruct(), shmInvalBuffer, ProcState::signaled, SInvalShmemSize(), and SpinLockInit.
Referenced by CreateSharedMemoryAndSemaphores().
LocalTransactionId GetNextLocalTransactionId | ( | void | ) |
Definition at line 780 of file sinvaladt.c.
References LocalTransactionIdIsValid, and nextLocalTransactionId.
Referenced by InitRecoveryTransactionEnvironment(), and StartTransaction().
void SharedInvalBackendInit | ( | bool | sendOnly | ) |
Definition at line 266 of file sinvaladt.c.
References Assert(), PGPROC::backendId, CleanupInvalidationState(), DEBUG4, elog(), ereport, errcode(), errmsg(), FATAL, ProcState::hasMessages, InvalidBackendId, SISeg::lastBackend, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SISeg::maxBackends, SISeg::maxMsgNum, MyBackendId, MyProc, MyProcPid, nextLocalTransactionId, ProcState::nextLXID, ProcState::nextMsgNum, on_shmem_exit(), PointerGetDatum(), ProcState::proc, ProcState::procPid, SISeg::procState, ProcState::resetState, ProcState::sendOnly, shmInvalBuffer, and ProcState::signaled.
Referenced by InitPostgres(), and InitRecoveryTransactionEnvironment().
void SICleanupQueue | ( | bool | callerHasWriteLock, |
int | minFree | ||
) |
Definition at line 654 of file sinvaladt.c.
References CLEANUP_MIN, CLEANUP_QUANTUM, DEBUG4, elog(), i, SISeg::lastBackend, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SISeg::maxMsgNum, MAXNUMMESSAGES, SISeg::minMsgNum, MSGNUMWRAPAROUND, ProcState::nextMsgNum, SISeg::nextThreshold, ProcState::procPid, PROCSIG_CATCHUP_INTERRUPT, SISeg::procState, ProcState::resetState, ProcState::sendOnly, SendProcSignal(), shmInvalBuffer, SIG_THRESHOLD, and ProcState::signaled.
Referenced by ReceiveSharedInvalidMessages(), and SIInsertDataEntries().
int SIGetDataEntries | ( | SharedInvalidationMessage * | data, |
int | datasize | ||
) |
Definition at line 550 of file sinvaladt.c.
References SISeg::buffer, data, ProcState::hasMessages, LW_SHARED, LWLockAcquire(), LWLockRelease(), SISeg::maxMsgNum, MAXNUMMESSAGES, SISeg::msgnumLock, MyBackendId, ProcState::nextMsgNum, SISeg::procState, ProcState::resetState, shmInvalBuffer, ProcState::signaled, SpinLockAcquire, and SpinLockRelease.
Referenced by ReceiveSharedInvalidMessages().
void SIInsertDataEntries | ( | const SharedInvalidationMessage * | data, |
int | n | ||
) |
Definition at line 447 of file sinvaladt.c.
References SISeg::buffer, data, ProcState::hasMessages, i, SISeg::lastBackend, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SISeg::maxMsgNum, MAXNUMMESSAGES, Min, SISeg::minMsgNum, SISeg::msgnumLock, SISeg::nextThreshold, SISeg::procState, shmInvalBuffer, SICleanupQueue(), SpinLockAcquire, SpinLockRelease, and WRITE_QUANTUM.
Referenced by SendSharedInvalidMessages().
Size SInvalShmemSize | ( | void | ) |
Definition at line 203 of file sinvaladt.c.
References add_size(), MaxBackends, and mul_size().
Referenced by CalculateShmemSize(), and CreateSharedInvalidationState().