{"Entry":{"collection":"guc","key":"extension_destdir","name":"extension_destdir","aliases":[],"metadata":{"baseline":false,"boot_human":"Empty string","boot_val":"","category":"File Locations","category_zh":"","changed_in":["15"],"changes":[{"documentation_changed":false,"fields":{},"from":"9.4","status":"added","to":"9.5"},{"documentation_changed":false,"fields":{"short_desc":{"from":"Path to prepend for extension loading","to":"Path to prepend for extension loading."}},"from":"14","status":"changed","to":"15"},{"documentation_changed":false,"fields":{},"from":"17","status":"removed","to":"18"}],"content_hash":"1a2af5b702b26f82290a29fb37e6f8fcce56df5b802f67379aafa6c18fc0449c","context":"superuser","default_changed_in":[],"default_history":[{"from":"9.5","to":"17","value":"Empty string"}],"editorial":{"advice":{"olap":"Apply the same migration to ETL and analytical extension stacks, including worker processes and standbys. Rehearse CREATE EXTENSION, ALTER EXTENSION UPDATE, restore, and failover with the final filesystem layout.","oltp":"Treat this as downstream migration debt, not a tuning control. Package extensions in supported locations, test extension_control_path and dynamic_library_path under the service account, and remove the obsolete key before the PostgreSQL 18 upgrade.","small":"Prefer standard package locations. A one-node system gains little from recreating a Debian build-time staging mechanism, while an unknown GUC can prevent a modern server from starting."},"mechanism":["The version matrix proves that extension_destdir is exposed by the measured Debian/PGDG binaries from PG9.5 through PG17. An exhaustive upstream GUC-source pickaxe has no introduction commit because the name comes from Debian's extension_destdir package patch, not the PostgreSQL source tree.","The patch prepends a DESTDIR-like staging root when the server locates extension control and SQL files and the modules behind functions. Debian's pg_virtualenv uses it to test a package before its files are installed in their final system paths; it was explicitly a packaging and build-time facility, not a general production extension search path.","From PostgreSQL 18, use the upstream extension_control_path for control and SQL files together with dynamic_library_path for shared libraries, or install the extension in standard locations. Remove extension_destdir from every config file, ALTER SYSTEM layer, role/database setting, and generated template before starting the newer server."],"pitfalls":["Calling extension_destdir an upstream PostgreSQL parameter or assigning it an upstream introduction commit.","Continuing to emit the downstream name on PostgreSQL 18 or later, where the measured packages no longer recognize it.","Migrating extension control files but forgetting the shared-library half of the path design.","Testing as a build user while the database service account cannot read the final directories, files, or parent paths."],"references":[{"title":"Debian source patch: extension_destdir","url":"https://sources.debian.org/patches/postgresql-17/17.10-0%2Bdeb13u1/extension_destdir/"},{"title":"Debian pg_virtualenv documentation","url":"https://manpages.debian.org/experimental/postgresql-common/pg_virtualenv.1.en.html"},{"title":"PostgreSQL 18: extension_control_path","url":"https://www.postgresql.org/docs/18/runtime-config-client.html#GUC-EXTENSION-CONTROL-PATH"}],"related":["extension_control_path","dynamic_library_path","shared_preload_libraries","session_preload_libraries","config_file"],"summary":"extension_destdir is a Debian/PGDG downstream staging-prefix GUC observed in the packaged PostgreSQL 9.5–17 images. It was never an upstream PostgreSQL parameter and disappears from the measured packages at PostgreSQL 18."},"enumvals":[],"first_version":"9.5","group":"File Locations","group_slug":"file-locations","imported_at":"2026-09-27T17:57:31.267595+08:00","intro_commit":{"status":"downstream_only"},"key":"extension_destdir","last_version":"17","max_val":"","min_val":"","name":"extension_destdir","position":144,"present_in":["9.5","9.6","10","11","12","13","14","15","16","17"],"short_desc":"Path to prepend for extension loading.","short_desc_zh":"","source_rev":"english-manuals:55ac55ca29149157d279290c36dcb7ad54561865a25187bc1dd662e8efcbd7bb","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"extension_destdir","SourceDatabase":"center","Version":"17","SourceTable":"guc","SourceKey":"extension_destdir","SourceRevision":"english-manuals:55ac55ca29149157d279290c36dcb7ad54561865a25187bc1dd662e8efcbd7bb","Facts":{"boot_val":"","category":"File Locations","context":"superuser","description":"","doc":{},"documented":false,"enumvals":null,"extra_desc":"This directory is prepended to paths when loading extensions (control and SQL files), and to the '$libdir' directive when loading modules that back functions. The location is made configurable to allow build-time testing of extensions that do not have been installed to their proper location yet.","lang":"en","max_val":null,"metadata_version":"17","min_val":null,"name":"extension_destdir","short_desc":"Path to prepend for extension loading.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{}},"MeasuredEvidence":{"metadata_version":"17"}},"Text":{"Collection":"guc","Key":"extension_destdir","SourceDatabase":"","Version":"","Locale":"","Title":"","Summary":"","BodyHTML":"","SourceRevision":"","ContentHash":"","Payload":null},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","9.5","9.6"],"Locales":[],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
