jit_dump_bitcode
Read PG 18 manual ↗Writes the generated LLVM IR out to the file system, inside data_directory.
- Type
- bool
- Context
- superuser
- Measured default
- off
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
Writes the generated LLVM IR out to the file system, inside data_directory. This is only useful for working on the internals of the JIT implementation. The default setting is off. Only superusers and users with the appropriate SET privilege can change this setting.
Measured default history
| Version interval | Default |
|---|---|
| 11 – 19 | off |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
jit_dump_bitcode writes generated LLVM IR/bitcode files inside data_directory for queries that actually run JIT. It exists to inspect and reproduce JIT compiler behavior.
It does not activate JIT and produces nothing when no query crosses the JIT gates. Generated artifacts can accumulate, consume disk, and contain details derived from executed expressions.
Only a tightly controlled debugging session should enable it; files require explicit collection and cleanup. Its superuser context permits an authorized session change without a server restart.
Operational considerations
Leaving jit_dump_bitcode enabled after the bounded diagnostic or recovery task.
Running the experiment on the only copy of production data.
Underestimating log, core-file, temporary-file, WAL, CPU, or connection-slot amplification.
Treating a server that merely starts or completes a query as proof that data and behavior are correct.
Workload guidance
OLAP: Long analytical runs can amplify jit_dump_bitcode's debug overhead and artifacts. Prefer standard EXPLAIN and statistics first, and isolate any developer experiment from normal users.
OLTP: Do not tune production OLTP with jit_dump_bitcode. Enable it only for a bounded reproduction with an owner, log/disk budget, rollback condition, and evidence-capture plan; restore the default immediately afterward.
SMALL: Keep jit_dump_bitcode at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation.
Version history 2
- PG 14 → 15changed
- PG 10 → 11added
Related entries
Further reading
Definition snapshot: english-manuals:6eab113dbc5559b7686c8b47d4e… · English manual source