local_preload_libraries
Fact — official short description: “Lists unprivileged shared libraries to preload into each backend.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | "" |
— | empty string |
How it works
local_preload_libraries lists unprivileged shared libraries to preload into each backend. Unprivileged users may name only libraries installed in PostgreSQL’s plugins subdirectory, making package placement part of the security boundary.
Although local_preload_libraries is configurable without a server restart, its library list is acted on only when a new backend starts; changing it inside an established connection does not unload or retroactively load modules.
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 | Do not tune local_preload_libraries generically. Load or expose only modules required by a reviewed feature, verify binary compatibility, and rehearse failure recovery before rollout. |
| OLAP | Use local_preload_libraries for a measured extension or JIT requirement, accounting for backend startup, resident memory, and behavior under connection pooling. |
| Small nodes | Keep local_preload_libraries minimal. A missing or incompatible module can reject connections or prevent startup, and every preloaded library consumes scarce address space or memory. |
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: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Changing local_preload_libraries 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 local_preload_libraries globally without a rollback plan and a client or operational compatibility test.
Related parameters
shared_preload_libraries · session_preload_libraries · dynamic_library_path · jit_provider · extension_control_path
References
- PostgreSQL 19 Beta 3 — local_preload_libraries
- PostgreSQL 19 release notes
- Machine-readable GUC export