{"Entry":{"collection":"hook","key":"shmem_request_hook","name":"shmem_request_hook","aliases":[],"metadata":{"aliases":[],"category":"Startup and shared memory","content_hash":"6187de685d3fd931fcfe3ab724a41d4fa06448484e4d9ba0f3e24127d6e311a6","derived_content_hash":"d1e01f0da678aa78acebfd75de7e0d5da7ea67cd00f4940c642af96c2ab5b816","imported_at":"2026-09-30T17:44:22.45552+08:00","name":"shmem_request_hook","name_zh":"shmem_request_hook","repair_provenance":{"original_source_revision":"","receipt_sha256":"1261737c7b884a9595e4effcd89829f50b2b1fc9db303d54f5b5ff48b4ea49d7","repair":"wiki-repair-20261023"},"slug":"shmem_request_hook","source_rev":"wiki-repair-20261023:5794ad745fda4c70a973466243e1d0c6453349b3d4f4e2f4ae2c2d4d64a5e775","summary":"shmem_request_hook: core extension hook declared in src/include/miscadmin.h. The exact interface and call sites are recorded below."}},"Definition":{"Collection":"hook","Key":"shmem_request_hook","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"shmem_request_hook","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["shmem_request_hook: core extension hook declared in src/include/miscadmin.h. The exact interface and call sites are recorded below."],"description_zh":"shmem_request_hook 是在 src/include/miscadmin.h 中声明的核心扩展钩子。下方保留精确接口与调用位置。","description_zh_html":"\u003cp\u003eshmem_request_hook 是在 src/include/miscadmin.h 中声明的核心扩展钩子。下方保留精确接口与调用位置。\u003c/p\u003e\u003cp\u003e以下中文为本站依据所列 PostgreSQL 源码注释编译的说明。\u003c/p\u003e\u003ch3\u003e接口声明\u003c/h3\u003e\u003cpre\u003etypedef void (*shmem_request_hook_type) (void);\nextern PGDLLIMPORT shmem_request_hook_type shmem_request_hook;\u003c/pre\u003e\u003ch3\u003e调用位置\u003c/h3\u003e\u003cul\u003e\u003cli\u003e\u003ccode\u003esrc/backend/utils/init/miscinit.c:1935\u003c/code\u003e\u003c/li\u003e\u003c/ul\u003e\u003ch3\u003e核心调用上下文：src/backend/utils/init/miscinit.c:1929–1943\u003c/h3\u003e\u003cpre\u003e */\nvoid\nprocess_shmem_requests(void)\n{\n\tprocess_shmem_requests_in_progress = true;\n\tif (shmem_request_hook)\n\t\tshmem_request_hook();\n\tprocess_shmem_requests_in_progress = false;\n}\n\nvoid\npg_bindtextdomain(const char *domain)\n{\n#ifdef ENABLE_NLS\n\tif (my_exec_path[0] != \u0026#x27;\\0\u0026#x27;)\u003c/pre\u003e","facts":[{"label":"Interface type","value":"shmem_request_hook_type"},{"label":"Header","value":"src/include/miscadmin.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/utils/init/miscinit.c:1935"],"title":"Call sites"},{"code":" */\nvoid\nprocess_shmem_requests(void)\n{\n\tprocess_shmem_requests_in_progress = true;\n\tif (shmem_request_hook)\n\t\tshmem_request_hook();\n\tprocess_shmem_requests_in_progress = false;\n}\n\nvoid\npg_bindtextdomain(const char *domain)\n{\n#ifdef ENABLE_NLS\n\tif (my_exec_path[0] != '\\0')","paragraphs":[],"title":"Core call context: src/backend/utils/init/miscinit.c:1929–1943"}],"signature":"typedef void (*shmem_request_hook_type) (void);\nextern PGDLLIMPORT shmem_request_hook_type shmem_request_hook;","sources":[{"label":"Interface declaration","path":"src/include/miscadmin.h","sha256":"597e33af3a463e98e900e9c20e949a48dfd0b20420d31f7db1d1eab58d4a89d3","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/miscadmin.h#L533"},{"label":"Core definition","path":"src/backend/utils/init/miscinit.c","sha256":"54bdb859c143a6c70d86067ccf2e124f59aa0852e5705bb653652e41a60af39a","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/init/miscinit.c#L1841"},{"label":"Call sites","path":"src/backend/utils/init/miscinit.c","sha256":"54bdb859c143a6c70d86067ccf2e124f59aa0852e5705bb653652e41a60af39a","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/init/miscinit.c#L1935"}],"translation_provenance":{"inputs":[{"label":"Interface declaration","path":"src/include/miscadmin.h","sha256":"597e33af3a463e98e900e9c20e949a48dfd0b20420d31f7db1d1eab58d4a89d3","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/miscadmin.h#L533"},{"label":"Core definition","path":"src/backend/utils/init/miscinit.c","sha256":"54bdb859c143a6c70d86067ccf2e124f59aa0852e5705bb653652e41a60af39a","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/init/miscinit.c#L1841"},{"label":"Call sites","path":"src/backend/utils/init/miscinit.c","sha256":"54bdb859c143a6c70d86067ccf2e124f59aa0852e5705bb653652e41a60af39a","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/init/miscinit.c#L1935"}],"kind":"authored-source-translation","locale":"zh-Hans","source_revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","translated_source_sha256":"1b70426b8d3daec3f214d046e574e76b5fc7189a62e0c3a85c6bbc991b74859d","version":"18"},"zh_from":"authored-source-translation"},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/miscadmin.h","sha256":"597e33af3a463e98e900e9c20e949a48dfd0b20420d31f7db1d1eab58d4a89d3","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/miscadmin.h#L533"},{"label":"Core definition","path":"src/backend/utils/init/miscinit.c","sha256":"54bdb859c143a6c70d86067ccf2e124f59aa0852e5705bb653652e41a60af39a","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/init/miscinit.c#L1841"},{"label":"Call sites","path":"src/backend/utils/init/miscinit.c","sha256":"54bdb859c143a6c70d86067ccf2e124f59aa0852e5705bb653652e41a60af39a","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/utils/init/miscinit.c#L1935"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"shmem_request_hook","SourceDatabase":"center","Version":"18","Locale":"en","Title":"shmem_request_hook","Summary":"shmem_request_hook: core extension hook declared in src/include/miscadmin.h. The exact interface and call sites are recorded below.","BodyHTML":"\u003cp\u003eshmem_request_hook: core extension hook declared in src/include/miscadmin.h. The exact interface and call sites are recorded below.\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"1b40c9884665b841abc3a276504a7cc5b83ad59b53e453c50e939e47bd323909","Payload":{"description":["shmem_request_hook: core extension hook declared in src/include/miscadmin.h. The exact interface and call sites are recorded below."],"related":[{"label":"shared_preload_libraries","url":"/wiki/guc/shared_preload_libraries/?v=18"}],"sections":[{"paragraphs":["src/backend/utils/init/miscinit.c:1935"],"title":"Call sites"},{"code":" */\nvoid\nprocess_shmem_requests(void)\n{\n\tprocess_shmem_requests_in_progress = true;\n\tif (shmem_request_hook)\n\t\tshmem_request_hook();\n\tprocess_shmem_requests_in_progress = false;\n}\n\nvoid\npg_bindtextdomain(const char *domain)\n{\n#ifdef ENABLE_NLS\n\tif (my_exec_path[0] != '\\0')","paragraphs":[],"title":"Core call context: src/backend/utils/init/miscinit.c:1929–1943"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
