PostgreSQL Source Code
git master
|
#include "utils/hsearch.h"
Go to the source code of this file.
Data Structures | |
struct | SHM_QUEUE |
struct | ShmemIndexEnt |
Macros | |
#define | SHMEM_INDEX_KEYSIZE (48) |
#define | SHMEM_INDEX_SIZE (64) |
Typedefs | |
typedef struct SHM_QUEUE | SHM_QUEUE |
Definition at line 502 of file shmem.c.
References ereport, errcode(), errmsg(), ERROR, s1, and s2.
Referenced by _bt_parallel_estimate_shared(), ApplyLauncherShmemSize(), AsyncShmemInit(), AsyncShmemSize(), AutoVacuumShmemSize(), BackendStatusShmemSize(), BackgroundWorkerShmemSize(), BTreeShmemSize(), BufferShmemSize(), CalculateShmemSize(), CheckpointerShmemSize(), CreateSharedProcArray(), estimate_variable_size(), EstimateComboCIDStateSpace(), EstimateGUCStateSpace(), EstimateLibraryStateSpace(), EstimateParamExecSpace(), EstimateParamListSpace(), EstimateSnapshotSpace(), EstimateTransactionStateSpace(), ExecAggEstimate(), ExecAppendEstimate(), ExecBitmapHeapEstimate(), ExecHashEstimate(), ExecIncrementalSortEstimate(), ExecMemoizeEstimate(), ExecSortEstimate(), expand_planner_arrays(), hash_estimate_size(), index_parallelscan_estimate(), index_parallelscan_initialize(), InitializeShmemGUCs(), LockShmemSize(), LWLockShmemSize(), MultiXactShmemSize(), PgArchShmemSize(), pgss_memsize(), PMSignalShmemSize(), PredicateLockShmemSize(), ProcArrayShmemSize(), ProcGlobalShmemSize(), ProcSignalShmemSize(), ReplicationOriginShmemSize(), ReplicationSlotsShmemSize(), RequestAddinShmemSpace(), SerializeTransactionState(), shm_toc_estimate(), SInvalShmemSize(), SnapMgrShmemSize(), StatsShmemSize(), StrategyShmemSize(), table_parallelscan_estimate(), tuplesort_estimate_shared(), TwoPhaseShmemSize(), WalRcvShmemSize(), WalSndShmemSize(), and XLOGShmemSize().
void InitShmemAccess | ( | void * | seghdr | ) |
Definition at line 101 of file shmem.c.
References ShmemBase, ShmemEnd, ShmemSegHdr, and PGShmemHeader::totalsize.
Referenced by CreateSharedMemoryAndSemaphores().
void InitShmemAllocation | ( | void | ) |
Definition at line 116 of file shmem.c.
References Assert(), CACHELINEALIGN, PGShmemHeader::freeoffset, PGShmemHeader::index, ShmemAlloc(), ShmemAllocUnlocked(), ShmemIndex, ShmemLock, ShmemSegHdr, ShmemVariableCache, and SpinLockInit.
Referenced by CreateSharedMemoryAndSemaphores().
void InitShmemIndex | ( | void | ) |
Definition at line 292 of file shmem.c.
References HASHCTL::entrysize, HASH_ELEM, HASH_STRINGS, HASHCTL::keysize, SHMEM_INDEX_KEYSIZE, SHMEM_INDEX_SIZE, ShmemIndex, and ShmemInitHash().
Referenced by CreateSharedMemoryAndSemaphores().
Definition at line 519 of file shmem.c.
References ereport, errcode(), errmsg(), ERROR, s1, and s2.
Referenced by _bt_begin_parallel(), ApplyLauncherShmemSize(), AsyncShmemInit(), AsyncShmemSize(), AutoVacuumShmemSize(), BackendStatusShmemSize(), BackgroundWorkerShmemSize(), BTreeShmemSize(), BufferShmemSize(), CheckpointerShmemSize(), CreateSharedBackendStatus(), CreateSharedProcArray(), EstimateComboCIDStateSpace(), EstimatePendingSyncsSpace(), EstimateReindexStateSpace(), EstimateSnapshotSpace(), EstimateTransactionStateSpace(), ExecAggEstimate(), ExecHashEstimate(), ExecIncrementalSortEstimate(), ExecInitParallelPlan(), ExecMemoizeEstimate(), ExecParallelRetrieveInstrumentation(), ExecParallelRetrieveJitInstrumentation(), ExecParallelSetupTupleQueues(), ExecSortEstimate(), hash_estimate_size(), InitializeParallelDSM(), InitPredicateLocks(), LWLockShmemSize(), parallel_vacuum_init(), PGSemaphoreShmemSize(), PMSignalShmemSize(), PredicateLockShmemSize(), ProcArrayShmemSize(), ProcGlobalShmemSize(), ProcSignalShmemSize(), ReplicationOriginShmemSize(), ReplicationSlotsShmemSize(), shm_toc_estimate(), SInvalShmemSize(), SnapMgrShmemSize(), tuplesort_estimate_shared(), TwoPhaseShmemSize(), WalSndShmemSize(), and XLOGShmemSize().
void RequestAddinShmemSpace | ( | Size | size | ) |
Definition at line 69 of file ipci.c.
References add_size(), elog, FATAL, process_shmem_requests_in_progress, and total_addin_request.
Referenced by autoprewarm_shmem_request(), and pgss_shmem_request().
bool ShmemAddrIsValid | ( | const void * | addr | ) |
Definition at line 283 of file shmem.c.
References ShmemBase, and ShmemEnd.
Referenced by NextPredXact(), ReleasePredXact(), ShmemInitStruct(), SHMQueueDelete(), SHMQueueElemInit(), SHMQueueEmpty(), SHMQueueInit(), SHMQueueInsertAfter(), SHMQueueInsertBefore(), SHMQueueIsDetached(), SHMQueueNext(), and SHMQueuePrev().
void* ShmemAlloc | ( | Size | size | ) |
Definition at line 161 of file shmem.c.
References ereport, errcode(), errmsg(), ERROR, and ShmemAllocRaw().
Referenced by CreateLWLocks(), InitPredicateLocks(), InitProcGlobal(), InitShmemAllocation(), and ShmemInitStruct().
void* ShmemAllocNoError | ( | Size | size | ) |
void* ShmemAllocUnlocked | ( | Size | size | ) |
Definition at line 247 of file shmem.c.
References Assert(), ereport, errcode(), errmsg(), ERROR, PGShmemHeader::freeoffset, MAXALIGN, ShmemBase, ShmemSegHdr, and PGShmemHeader::totalsize.
Referenced by InitShmemAllocation(), PGReserveSemaphores(), and SpinlockSemaInit().
HTAB* ShmemInitHash | ( | const char * | name, |
long | init_size, | ||
long | max_size, | ||
HASHCTL * | infoP, | ||
int | hash_flags | ||
) |
Definition at line 341 of file shmem.c.
References HASHCTL::alloc, HASHCTL::dsize, HASH_ALLOC, HASH_ATTACH, hash_create(), HASH_DIRSIZE, hash_get_shared_size(), hash_select_dirsize(), HASH_SHARED_MEM, HASHCTL::hctl, HASHCTL::max_dsize, name, ShmemAllocNoError(), and ShmemInitStruct().
Referenced by InitBufTable(), InitLocks(), InitPredicateLocks(), InitShmemIndex(), and pgss_shmem_startup().
Definition at line 396 of file shmem.c.
References ShmemIndexEnt::allocated_size, Assert(), CACHELINEALIGN, ereport, errcode(), errmsg(), ERROR, HASH_ENTER_NULL, HASH_REMOVE, hash_search(), PGShmemHeader::index, IsUnderPostmaster, ShmemIndexEnt::location, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), name, ShmemAddrIsValid(), ShmemAlloc(), ShmemAllocRaw(), ShmemIndex, ShmemSegHdr, and ShmemIndexEnt::size.
Referenced by ApplyLauncherShmemInit(), apw_init_shmem(), AsyncShmemInit(), AutoVacuumShmemInit(), BackgroundWorkerShmemInit(), BTreeShmemInit(), CheckpointerShmemInit(), CommitTsShmemInit(), CreateSharedBackendStatus(), CreateSharedInvalidationState(), CreateSharedProcArray(), dsm_shmem_init(), InitBufferPool(), InitLocks(), InitPredicateLocks(), InitProcGlobal(), MultiXactShmemInit(), PgArchShmemInit(), pgss_shmem_startup(), PMSignalShmemInit(), ProcSignalShmemInit(), ReplicationOriginShmemInit(), ReplicationSlotsShmemInit(), SerialInit(), ShmemInitHash(), SimpleLruInit(), SnapMgrInit(), StatsShmemInit(), StrategyInitialize(), SyncScanShmemInit(), TwoPhaseShmemInit(), WalRcvShmemInit(), WalSndShmemInit(), XLogPrefetchShmemInit(), XLogRecoveryShmemInit(), and XLOGShmemInit().
void SHMQueueDelete | ( | SHM_QUEUE * | queue | ) |
Definition at line 68 of file shmqueue.c.
References Assert(), SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by CheckTargetForConflictsIn(), CleanUpLock(), ClearOldPredicateLocks(), CreatePredXact(), DeleteChildTargetLocks(), DeleteLockTarget(), DropAllPredicateLocksFromTable(), LockAcquireExtended(), PostPrepare_Locks(), ProcWakeup(), ReleaseOneSerializableXact(), ReleasePredXact(), ReleaseRWConflict(), RemoveFromWaitQueue(), SetPossibleUnsafeConflict(), SetRWConflict(), SummarizeOldestCommittedSxact(), SyncRepCancelWait(), SyncRepCleanupAtProcExit(), SyncRepWakeQueue(), and TransferPredicateLocksToNewTarget().
void SHMQueueElemInit | ( | SHM_QUEUE * | queue | ) |
Definition at line 57 of file shmqueue.c.
References Assert(), SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by GetSerializableTransactionSnapshotInt(), InitAuxiliaryProcess(), InitProcess(), MarkAsPreparingGuts(), and predicatelock_twophase_recover().
Definition at line 180 of file shmqueue.c.
References Assert(), SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by CheckForSerializableConflictOut(), CleanUpLock(), GetSafeSnapshot(), InitAuxiliaryProcess(), InitProcess(), lock_twophase_recover(), ProcKill(), ReleasePredicateLocks(), RemoveTargetIfNoLongerUsed(), RWConflictExists(), SetupLockInTable(), SummarizeOldestCommittedSxact(), and TransferPredicateLocksToNewTarget().
void SHMQueueInit | ( | SHM_QUEUE * | queue | ) |
Definition at line 36 of file shmqueue.c.
References Assert(), SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by CreatePredicateLock(), DropAllPredicateLocksFromTable(), GetSerializableTransactionSnapshotInt(), InitPredicateLocks(), InitProcGlobal(), lock_twophase_recover(), MarkAsPreparingGuts(), predicatelock_twophase_recover(), ProcQueueInit(), ReleaseOneSerializableXact(), SetupLockInTable(), TransferPredicateLocksToNewTarget(), and WalSndShmemInit().
Definition at line 108 of file shmqueue.c.
References Assert(), SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by SyncRepQueueInsert().
Definition at line 89 of file shmqueue.c.
References Assert(), SHM_QUEUE::next, SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by CreatePredicateLock(), CreatePredXact(), DeadLockCheck(), DropAllPredicateLocksFromTable(), InitPredicateLocks(), lock_twophase_recover(), PostPrepare_Locks(), ProcSleep(), ReleaseOneSerializableXact(), ReleasePredicateLocks(), ReleasePredXact(), ReleaseRWConflict(), SetPossibleUnsafeConflict(), SetRWConflict(), SetupLockInTable(), and TransferPredicateLocksToNewTarget().
Definition at line 47 of file shmqueue.c.
References Assert(), SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by SyncRepCancelWait(), SyncRepCleanupAtProcExit(), and SyncRepWaitForLSN().
Definition at line 145 of file shmqueue.c.
References Assert(), SHM_QUEUE::next, and ShmemAddrIsValid().
Referenced by AtPrepare_PredicateLocks(), CheckTableForSerializableConflictIn(), CheckTargetForConflictsIn(), ClearOldPredicateLocks(), CreatePredXact(), DeleteChildTargetLocks(), DeleteLockTarget(), DropAllPredicateLocksFromTable(), FindLockCycleRecurseMember(), FirstPredXact(), FlagSxactUnsafe(), GetLockConflicts(), GetSafeSnapshotBlockingPids(), GetSingleProcBlockerStatusData(), LockCheckConflicts(), LockReleaseAll(), NextPredXact(), OnConflict_CheckForSerializationFailure(), PostPrepare_Locks(), PreCommit_CheckForSerializationFailure(), ProcSleep(), ReleaseOneSerializableXact(), ReleasePredicateLocks(), RWConflictExists(), SetPossibleUnsafeConflict(), SetRWConflict(), SummarizeOldestCommittedSxact(), SyncRepWakeQueue(), and TransferPredicateLocksToNewTarget().
Definition at line 164 of file shmqueue.c.
References Assert(), SHM_QUEUE::prev, and ShmemAddrIsValid().
Referenced by SyncRepQueueInsert().