DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Developer Options

jit_expressions

Allow JIT compilation of expressions.

  • Default: on
  • Type: bool
  • Applies: Session (any user)

In plain words

When a query is expensive enough to be JIT-compiled, PostgreSQL can turn its expressions (filters, calculations, aggregates) into native machine code. This switch allows or forbids that part. It is on by default and is mostly a way to isolate JIT problems.

For DBAs and operators

Only matters when jit is on and a plan's cost exceeds jit_above_cost. Measured on 18.6 (a sum over a 100,000-row table, jit_above_cost = 0):

JIT:
  Functions: 5
  Options: Inlining false, Optimization false, Expressions true, Deforming true
  Timing: Generation 0.270 ms (Deform 0.100 ms), …, Emission 3.582 ms, Total 4.096 ms

With jit_expressions = off no JIT section appeared at all: in practice, deforming functions are only generated as part of compiled expressions, so turning this off disables almost all JIT work. That makes it a quick way to test whether a slowdown or crash is JIT-related without touching jit itself.

Common support case: short OLTP-ish queries on large tables show Total 200 ms of JIT time for a 5 ms query; the real fix is usually raising jit_above_cost or setting jit = off for that workload.

How to change it

Any user can change it for their session with SET.

See it in context

JIT compilation Life of a query

Related parameters

jit jit_tuple_deforming jit_above_cost jit_provider

All Developer Options parameters