PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/clog.h"
#include "access/commit_ts.h"
#include "access/heapam.h"
#include "access/multixact.h"
#include "access/nbtree.h"
#include "access/subtrans.h"
#include "access/syncscan.h"
#include "access/twophase.h"
#include "access/xlogprefetcher.h"
#include "access/xlogrecovery.h"
#include "commands/async.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/autovacuum.h"
#include "postmaster/bgworker_internals.h"
#include "postmaster/bgwriter.h"
#include "postmaster/postmaster.h"
#include "replication/logicallauncher.h"
#include "replication/origin.h"
#include "replication/slot.h"
#include "replication/walreceiver.h"
#include "replication/walsender.h"
#include "storage/bufmgr.h"
#include "storage/dsm.h"
#include "storage/ipc.h"
#include "storage/pg_shmem.h"
#include "storage/pmsignal.h"
#include "storage/predicate.h"
#include "storage/proc.h"
#include "storage/procarray.h"
#include "storage/procsignal.h"
#include "storage/sinvaladt.h"
#include "storage/spin.h"
#include "utils/guc.h"
#include "utils/snapmgr.h"
#include "utils/wait_event.h"
Go to the source code of this file.
Functions | |
void | RequestAddinShmemSpace (Size size) |
Size | CalculateShmemSize (int *num_semaphores) |
void | CreateSharedMemoryAndSemaphores (void) |
void | InitializeShmemGUCs (void) |
Variables | |
int | shared_memory_type = DEFAULT_SHARED_MEMORY_TYPE |
shmem_startup_hook_type | shmem_startup_hook = NULL |
static Size | total_addin_request = 0 |
Size CalculateShmemSize | ( | int * | num_semaphores | ) |
Definition at line 86 of file ipci.c.
References add_size(), ApplyLauncherShmemSize(), AsyncShmemSize(), AutoVacuumShmemSize(), BackendStatusShmemSize(), BackgroundWorkerShmemSize(), BTreeShmemSize(), BufferShmemSize(), CheckpointerShmemSize(), CLOGShmemSize(), CommitTsShmemSize(), dsm_estimate_size(), hash_estimate_size(), LockShmemSize(), LWLockShmemSize(), MultiXactShmemSize(), PgArchShmemSize(), PGSemaphoreShmemSize(), PMSignalShmemSize(), PredicateLockShmemSize(), ProcArrayShmemSize(), ProcGlobalSemas(), ProcGlobalShmemSize(), ProcSignalShmemSize(), ReplicationOriginShmemSize(), ReplicationSlotsShmemSize(), SHMEM_INDEX_SIZE, SInvalShmemSize(), SpinlockSemas(), SpinlockSemaSize(), StatsShmemSize(), SUBTRANSShmemSize(), SyncScanShmemSize(), total_addin_request, TwoPhaseShmemSize(), WaitEventExtensionShmemSize(), WalRcvShmemSize(), WalSndShmemSize(), XLogPrefetchShmemSize(), XLogRecoveryShmemSize(), and XLOGShmemSize().
Referenced by CreateSharedMemoryAndSemaphores(), and InitializeShmemGUCs().
void CreateSharedMemoryAndSemaphores | ( | void | ) |
Definition at line 175 of file ipci.c.
References ApplyLauncherShmemInit(), Assert(), AsyncShmemInit(), AutoVacuumShmemInit(), BackgroundWorkerShmemInit(), BTreeShmemInit(), CalculateShmemSize(), CheckpointerShmemInit(), CLOGShmemInit(), CommitTsShmemInit(), CreateLWLocks(), CreateSharedBackendStatus(), CreateSharedInvalidationState(), CreateSharedProcArray(), DEBUG3, dsm_postmaster_startup(), dsm_shmem_init(), elog(), GetConfigOption(), InitBufferPool(), InitLocks(), InitPredicateLocks(), InitProcGlobal(), InitShmemAccess(), InitShmemAllocation(), InitShmemIndex(), IsUnderPostmaster, MultiXactShmemInit(), PANIC, PgArchShmemInit(), PGReserveSemaphores(), PGSharedMemoryCreate(), PMSignalShmemInit(), ProcSignalShmemInit(), ReplicationOriginShmemInit(), ReplicationSlotsShmemInit(), shmem_startup_hook, SpinlockSemaInit(), StatsShmemInit(), SUBTRANSShmemInit(), SyncScanShmemInit(), TwoPhaseShmemInit(), WaitEventExtensionShmemInit(), WalRcvShmemInit(), WalSndShmemInit(), XLogPrefetchShmemInit(), XLogRecoveryShmemInit(), and XLOGShmemInit().
Referenced by BootstrapModeMain(), PostgresSingleUserMain(), PostmasterMain(), and PostmasterStateMachine().
void InitializeShmemGUCs | ( | void | ) |
Definition at line 333 of file ipci.c.
References add_size(), buf, CalculateShmemSize(), GetHugePageSize(), PGC_INTERNAL, PGC_S_DYNAMIC_DEFAULT, SetConfigOption(), and sprintf.
Referenced by PostgresSingleUserMain(), and PostmasterMain().
void RequestAddinShmemSpace | ( | Size | size | ) |
Definition at line 71 of file ipci.c.
References add_size(), elog(), FATAL, process_shmem_requests_in_progress, and total_addin_request.
Referenced by autoprewarm_shmem_request(), pgss_shmem_request(), and test_slru_shmem_request().
int shared_memory_type = DEFAULT_SHARED_MEMORY_TYPE |
Definition at line 55 of file ipci.c.
Referenced by PGSharedMemoryCreate().
shmem_startup_hook_type shmem_startup_hook = NULL |
Definition at line 57 of file ipci.c.
Referenced by _PG_init(), and CreateSharedMemoryAndSemaphores().
|
static |
Definition at line 59 of file ipci.c.
Referenced by CalculateShmemSize(), and RequestAddinShmemSpace().