{"Entry":{"collection":"hook","key":"shmem_startup_hook","name":"shmem_startup_hook","aliases":[],"metadata":{"aliases":[],"category":"Startup and shared memory","content_hash":"ebe8d9817c2337f6f1564f254f021f50ffd04f903a37d58eeee6956e9f8acaab","imported_at":"2026-09-30T17:44:22.45807+08:00","name":"shmem_startup_hook","name_zh":"shmem_startup_hook","slug":"shmem_startup_hook","summary":"Now give loadable modules a chance to set up their shmem allocations"}},"Definition":{"Collection":"hook","Key":"shmem_startup_hook","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"shmem_startup_hook","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["Now give loadable modules a chance to set up their shmem allocations"],"facts":[{"label":"Interface type","value":"shmem_startup_hook_type"},{"label":"Header","value":"src/include/storage/ipc.h"},{"label":"Subsystem","value":"Startup and shared memory"},{"label":"Initial value","value":"NULL (no hook installed)"}],"related":[{"label":"shared_preload_libraries","url":"/wiki/guc/shared_preload_libraries/?v=18"}],"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sections":[{"paragraphs":["src/backend/storage/ipc/ipci.c:191","src/backend/storage/ipc/ipci.c:249"],"title":"Call sites"},{"code":"\tCreateOrAttachShmemStructs();\n\n\t/*\n\t * Now give loadable modules a chance to set up their shmem allocations\n\t */\n\tif (shmem_startup_hook)\n\t\tshmem_startup_hook();\n}\n#endif\n\n/*\n * CreateSharedMemoryAndSemaphores\n *\t\tCreates and initializes shared memory and semaphores.\n */\nvoid","paragraphs":[],"title":"Core call context: src/backend/storage/ipc/ipci.c:185–199"},{"code":"\tdsm_postmaster_startup(shim);\n\n\t/*\n\t * Now give loadable modules a chance to set up their shmem allocations\n\t */\n\tif (shmem_startup_hook)\n\t\tshmem_startup_hook();\n}\n\n/*\n * Initialize various subsystems, setting up their data structures in\n * shared memory.\n *\n * This is called by the postmaster or by a standalone backend.\n * It is also called by a backend forked from the postmaster in the","paragraphs":[],"title":"Core call context: src/backend/storage/ipc/ipci.c:243–257"}],"signature":"typedef void (*shmem_startup_hook_type) (void);\nextern PGDLLIMPORT shmem_startup_hook_type shmem_startup_hook;","sources":[{"label":"Interface declaration","path":"src/include/storage/ipc.h","sha256":"7eaed5df20e9c94832bf72b758512f55113d727b3cfc426cf7642b2a8ca89334","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/storage/ipc.h#L22"},{"label":"Core definition","path":"src/backend/storage/ipc/ipci.c","sha256":"2fa09c75851a35bfb974c97e64f82505e236e56cf480ded7ed7a632cec39d77c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/storage/ipc/ipci.c#L58"},{"label":"Call sites","path":"src/backend/storage/ipc/ipci.c","sha256":"2fa09c75851a35bfb974c97e64f82505e236e56cf480ded7ed7a632cec39d77c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/storage/ipc/ipci.c#L191"}]},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/storage/ipc.h","sha256":"7eaed5df20e9c94832bf72b758512f55113d727b3cfc426cf7642b2a8ca89334","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/storage/ipc.h#L22"},{"label":"Core definition","path":"src/backend/storage/ipc/ipci.c","sha256":"2fa09c75851a35bfb974c97e64f82505e236e56cf480ded7ed7a632cec39d77c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/storage/ipc/ipci.c#L58"},{"label":"Call sites","path":"src/backend/storage/ipc/ipci.c","sha256":"2fa09c75851a35bfb974c97e64f82505e236e56cf480ded7ed7a632cec39d77c","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/storage/ipc/ipci.c#L191"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"shmem_startup_hook","SourceDatabase":"center","Version":"18","Locale":"en","Title":"shmem_startup_hook","Summary":"Now give loadable modules a chance to set up their shmem allocations","BodyHTML":"\u003cp\u003eNow give loadable modules a chance to set up their shmem allocations\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"535836f13dfb95ea1b08f58f50abffd58b5b5816a5eefd11324526d05073b656","Payload":{"description":["Now give loadable modules a chance to set up their shmem allocations"],"related":[{"label":"shared_preload_libraries","url":"/wiki/guc/shared_preload_libraries/?v=18"}],"sections":[{"paragraphs":["src/backend/storage/ipc/ipci.c:191","src/backend/storage/ipc/ipci.c:249"],"title":"Call sites"},{"code":"\tCreateOrAttachShmemStructs();\n\n\t/*\n\t * Now give loadable modules a chance to set up their shmem allocations\n\t */\n\tif (shmem_startup_hook)\n\t\tshmem_startup_hook();\n}\n#endif\n\n/*\n * CreateSharedMemoryAndSemaphores\n *\t\tCreates and initializes shared memory and semaphores.\n */\nvoid","paragraphs":[],"title":"Core call context: src/backend/storage/ipc/ipci.c:185–199"},{"code":"\tdsm_postmaster_startup(shim);\n\n\t/*\n\t * Now give loadable modules a chance to set up their shmem allocations\n\t */\n\tif (shmem_startup_hook)\n\t\tshmem_startup_hook();\n}\n\n/*\n * Initialize various subsystems, setting up their data structures in\n * shared memory.\n *\n * This is called by the postmaster or by a standalone backend.\n * It is also called by a backend forked from the postmaster in the","paragraphs":[],"title":"Core call context: src/backend/storage/ipc/ipci.c:243–257"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
