extension_control_path
Fact — official short description: “Sets the path for extension control files.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG18 |
| Present in | PG18–19 Beta 3 |
| Removed in | No |
| Introduction commit | 4f7f7b037585 — extension_control_path |
| Commit date | 2025-03-19 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG18–19 Beta 3 | $system |
— | $system |
How it works
extension_control_path sets the path for extension control files. The remaining extension script and secondary control files are then loaded from the same directory where the primary control file was found. PostgreSQL searches this path for an extension’s primary control file, then loads its scripts and secondary control files from the directory where that primary file was found.
extension_control_path is a SUPERUSER-context setting. Superuser or a role granted the appropriate SET privilege can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.
Library discovery and preloading interact with installed binary versions, extension control files, server or backend startup, and the module’s own GUCs.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep $system first and add only administrator-controlled extension repositories whose control files, scripts, native libraries, upgrades, and rollback are versioned together. |
| OLAP | Use a separate path only to distribute a reviewed extension catalog consistently across primary and standby packages; test CREATE EXTENSION and every upgrade edge. |
| Small nodes | Keep $system. Extra control-file roots do not improve capacity and make extension provenance and disaster recovery harder to audit. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG18–19 Beta 3 unmodified; OLAP: PG18–19 Beta 3 unmodified; CRIT: PG18–19 Beta 3 unmodified; TINY: PG18–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Changing extension_control_path in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.
- Naming a missing or ABI-incompatible module and causing connection failure or a server that cannot start.
- Treating a search or preload path as harmless even though it defines which native code the server trusts.
- Changing extension_control_path globally without a rollback plan and a client or operational compatibility test.
Related parameters
shared_preload_libraries · session_preload_libraries · local_preload_libraries · dynamic_library_path · jit_provider
References
- PostgreSQL 19 Beta 3 — extension_control_path
- PostgreSQL 19 release notes
- Machine-readable GUC export