PostgreSQL Source Code git master
|
Go to the source code of this file.
Functions | |
Size | SharedInvalShmemSize (void) |
void | SharedInvalShmemInit (void) |
void | SharedInvalBackendInit (bool sendOnly) |
void | SIInsertDataEntries (const SharedInvalidationMessage *data, int n) |
int | SIGetDataEntries (SharedInvalidationMessage *data, int datasize) |
void | SICleanupQueue (bool callerHasWriteLock, int minFree) |
LocalTransactionId | GetNextLocalTransactionId (void) |
LocalTransactionId GetNextLocalTransactionId | ( | void | ) |
Definition at line 700 of file sinvaladt.c.
References LocalTransactionIdIsValid, and nextLocalTransactionId.
Referenced by InitRecoveryTransactionEnvironment(), and StartTransaction().
void SharedInvalBackendInit | ( | bool | sendOnly | ) |
Definition at line 271 of file sinvaladt.c.
References CleanupInvalidationState(), elog, ERROR, ProcState::hasMessages, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SISeg::maxMsgNum, MyProcNumber, MyProcPid, nextLocalTransactionId, ProcState::nextLXID, ProcState::nextMsgNum, SISeg::numProcs, NumProcStateSlots, on_shmem_exit(), PANIC, SISeg::pgprocnos, PointerGetDatum(), ProcState::procPid, SISeg::procState, ProcState::resetState, ProcState::sendOnly, shmInvalBuffer, and ProcState::signaled.
Referenced by InitPostgres(), and InitRecoveryTransactionEnvironment().
void SharedInvalShmemInit | ( | void | ) |
Definition at line 233 of file sinvaladt.c.
References CLEANUP_MIN, ProcState::hasMessages, i, InvalidLocalTransactionId, SISeg::maxMsgNum, SISeg::minMsgNum, SISeg::msgnumLock, ProcState::nextLXID, ProcState::nextMsgNum, SISeg::nextThreshold, SISeg::numProcs, NumProcStateSlots, SISeg::pgprocnos, ProcState::procPid, SISeg::procState, ProcState::resetState, SharedInvalShmemSize(), ShmemInitStruct(), shmInvalBuffer, ProcState::signaled, and SpinLockInit.
Referenced by CreateOrAttachShmemStructs().
Size SharedInvalShmemSize | ( | void | ) |
Definition at line 217 of file sinvaladt.c.
References add_size(), mul_size(), NumProcStateSlots, and size.
Referenced by CalculateShmemSize(), and SharedInvalShmemInit().
void SICleanupQueue | ( | bool | callerHasWriteLock, |
int | minFree | ||
) |
Definition at line 576 of file sinvaladt.c.
References Assert, CLEANUP_MIN, CLEANUP_QUANTUM, DEBUG4, elog, i, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SISeg::maxMsgNum, MAXNUMMESSAGES, SISeg::minMsgNum, MSGNUMWRAPAROUND, ProcState::nextMsgNum, SISeg::nextThreshold, SISeg::numProcs, SISeg::pgprocnos, 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 472 of file sinvaladt.c.
References SISeg::buffer, data, ProcState::hasMessages, LW_SHARED, LWLockAcquire(), LWLockRelease(), SISeg::maxMsgNum, MAXNUMMESSAGES, SISeg::msgnumLock, MyProcNumber, 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 369 of file sinvaladt.c.
References SISeg::buffer, data, ProcState::hasMessages, i, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SISeg::maxMsgNum, MAXNUMMESSAGES, Min, SISeg::minMsgNum, SISeg::msgnumLock, SISeg::nextThreshold, SISeg::numProcs, SISeg::pgprocnos, SISeg::procState, shmInvalBuffer, SICleanupQueue(), SpinLockAcquire, SpinLockRelease, and WRITE_QUANTUM.
Referenced by SendSharedInvalidMessages().