PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/clog.h"
#include "access/commit_ts.h"
#include "access/multixact.h"
#include "access/nbtree.h"
#include "access/subtrans.h"
#include "access/syncscan.h"
#include "access/transam.h"
#include "access/twophase.h"
#include "access/xlogprefetcher.h"
#include "access/xlogrecovery.h"
#include "commands/async.h"
#include "commands/waitlsn.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 "postmaster/walsummarizer.h"
#include "replication/logicallauncher.h"
#include "replication/origin.h"
#include "replication/slot.h"
#include "replication/slotsync.h"
#include "replication/walreceiver.h"
#include "replication/walsender.h"
#include "storage/bufmgr.h"
#include "storage/dsm.h"
#include "storage/dsm_registry.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/injection_point.h"
Go to the source code of this file.
Functions | |
static void | CreateOrAttachShmemStructs (void) |
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 91 of file ipci.c.
References add_size(), ApplyLauncherShmemSize(), AsyncShmemSize(), AutoVacuumShmemSize(), BackendStatusShmemSize(), BackgroundWorkerShmemSize(), BTreeShmemSize(), BufferManagerShmemSize(), CheckpointerShmemSize(), CLOGShmemSize(), CommitTsShmemSize(), dsm_estimate_size(), DSMRegistryShmemSize(), hash_estimate_size(), InjectionPointShmemSize(), LockManagerShmemSize(), LWLockShmemSize(), MultiXactShmemSize(), PgArchShmemSize(), PGSemaphoreShmemSize(), PMSignalShmemSize(), PredicateLockShmemSize(), ProcArrayShmemSize(), ProcGlobalSemas(), ProcGlobalShmemSize(), ProcSignalShmemSize(), ReplicationOriginShmemSize(), ReplicationSlotsShmemSize(), SharedInvalShmemSize(), SHMEM_INDEX_SIZE, size, SlotSyncShmemSize(), StatsShmemSize(), SUBTRANSShmemSize(), SyncScanShmemSize(), total_addin_request, TwoPhaseShmemSize(), VarsupShmemSize(), WaitEventCustomShmemSize(), WaitLSNShmemSize(), WalRcvShmemSize(), WalSndShmemSize(), WalSummarizerShmemSize(), XLogPrefetchShmemSize(), XLogRecoveryShmemSize(), and XLOGShmemSize().
Referenced by CreateSharedMemoryAndSemaphores(), and InitializeShmemGUCs().
|
static |
Definition at line 262 of file ipci.c.
References ApplyLauncherShmemInit(), AsyncShmemInit(), AutoVacuumShmemInit(), BackendStatusShmemInit(), BackgroundWorkerShmemInit(), BTreeShmemInit(), BufferManagerShmemInit(), CheckpointerShmemInit(), CLOGShmemInit(), CommitTsShmemInit(), CreateLWLocks(), dsm_shmem_init(), DSMRegistryShmemInit(), InitProcGlobal(), InitShmemIndex(), InjectionPointShmemInit(), IsUnderPostmaster, LockManagerShmemInit(), MultiXactShmemInit(), PgArchShmemInit(), PMSignalShmemInit(), PredicateLockShmemInit(), ProcArrayShmemInit(), ProcSignalShmemInit(), ReplicationOriginShmemInit(), ReplicationSlotsShmemInit(), SharedInvalShmemInit(), SlotSyncShmemInit(), StatsShmemInit(), SUBTRANSShmemInit(), SyncScanShmemInit(), TwoPhaseShmemInit(), VarsupShmemInit(), WaitEventCustomShmemInit(), WaitLSNShmemInit(), WalRcvShmemInit(), WalSndShmemInit(), WalSummarizerShmemInit(), XLogPrefetchShmemInit(), XLogRecoveryShmemInit(), and XLOGShmemInit().
Referenced by CreateSharedMemoryAndSemaphores().
void CreateSharedMemoryAndSemaphores | ( | void | ) |
Definition at line 196 of file ipci.c.
References Assert, CalculateShmemSize(), CreateOrAttachShmemStructs(), DEBUG3, dsm_postmaster_startup(), elog, GetConfigOption(), InitShmemAccess(), InitShmemAllocation(), IsUnderPostmaster, PGReserveSemaphores(), PGSharedMemoryCreate(), shmem_startup_hook, and size.
Referenced by BootstrapModeMain(), PostgresSingleUserMain(), PostmasterMain(), and PostmasterStateMachine().
void InitializeShmemGUCs | ( | void | ) |
Definition at line 351 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 76 of file ipci.c.
References add_size(), elog, FATAL, process_shmem_requests_in_progress, size, and total_addin_request.
Referenced by injection_shmem_request(), pgss_shmem_request(), and test_slru_shmem_request().
int shared_memory_type = DEFAULT_SHARED_MEMORY_TYPE |
Definition at line 58 of file ipci.c.
Referenced by PGSharedMemoryCreate().
shmem_startup_hook_type shmem_startup_hook = NULL |
Definition at line 60 of file ipci.c.
Referenced by _PG_init(), and CreateSharedMemoryAndSemaphores().
|
static |
Definition at line 62 of file ipci.c.
Referenced by CalculateShmemSize(), and RequestAddinShmemSpace().