select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / DEVELOPER OPTIONS

jit_expressions

Read PG 18 manual ↗

Determines whether expressions are JIT compiled, when JIT compilation is activated (see Section 30.2).

Type
bool
Context
user
Measured default
on
Unit
Metadata snapshot
18

Definition PG 18 manual

Determines whether expressions are JIT compiled, when JIT compilation is activated (see Section 30.2). The default is on.

Measured default history
Version intervalDefault
11 – 19on
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

jit_expressions controls whether expression evaluation is JIT compiled after the query has already crossed the top-level JIT cost gate. It does not activate JIT by itself.

Disabling it leaves expressions interpreted while other eligible JIT work can still occur. This isolates expression-code generation for testing correctness or compilation overhead.

The setting is a developer diagnostic rather than the normal way to tune JIT; jit_above_cost and the top-level jit switch govern production selection. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.

Operational considerations

Leaving jit_expressions 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_expressions'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_expressions. 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_expressions at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation.

Version history 4
  1. PG 16 → 17changed
  2. PG 13 → 14changed
  3. PG 11 → 12changed
  4. PG 10 → 11added

Related entries

Further reading

Definition snapshot: english-manuals:108feccf0003b869de0bc30a568… · English manual source