MCPcopy Create free account
hub / github.com/apache/cloudberry / MaxLivePostmasterChildren

Function MaxLivePostmasterChildren

src/backend/postmaster/postmaster.c:6420–6425  ·  view source on GitHub ↗

* MaxLivePostmasterChildren * * This reports the number of entries needed in per-child-process arrays * (the PMChildFlags array, and if EXEC_BACKEND the ShmemBackendArray). * These arrays include regular backends, autovac workers, walsenders * and background workers, but not special children nor dead_end children. * This allows the arrays to have a fixed maximum size, to wit the same * too-

Source from the content-addressed store, hash-verified

6418 * isn't too critical as long as it's more than MaxBackends.
6419 */
6420int
6421MaxLivePostmasterChildren(void)
6422{
6423 return 2 * (MaxConnections + autovacuum_max_workers + 1 +
6424 login_monitor_max_processes /* Login Monitor */ + max_wal_senders + max_worker_processes);
6425}
6426
6427/*
6428 * Connect background worker to a database.

Callers 5

PMSignalShmemSizeFunction · 0.85
PMSignalShmemInitFunction · 0.85
processCancelRequestFunction · 0.85
canAcceptConnectionsFunction · 0.85
ShmemBackendArraySizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected