]> git.ipfire.org Git - thirdparty/postgresql.git/commit
jit: Change the default to off.
authorTomas Vondra <tomas.vondra@postgresql.org>
Thu, 2 Apr 2026 10:53:18 +0000 (12:53 +0200)
committerTomas Vondra <tomas.vondra@postgresql.org>
Thu, 2 Apr 2026 11:40:29 +0000 (13:40 +0200)
commit7f8c88c2b872cb74882ab93dcb05529dab2a10bc
tree66fd6b8fbc24b56b6f364cb2dc6dbf257ee293d3
parent148fe2b05df592f5bca575b4e5e8a4253ea5a3ce
jit: Change the default to off.

While JIT can speed up large analytical queries, it can also cause
serious performance issues on otherwise very fast queries. Compiling
and optimizing the expressions may be so expensive, it completely
outweighs the JIT benefits for shorter queries.

Ideally, we'd address this in the cost model, but the part deciding
whether to enable JIT for a query is rather simple, partially because we
don't have any reliable estimates of how expensive the LLVM compilation
and optimization is.

Sometimes seemingly unrelated changes (for example a couple additional
INSERTs into a table) increase the cost just enough to enable JIT,
resulting in a performance cliff.

Because of these risks, most large-scale deployments already disable JIT
by default. Notably, this includes all hyperscalers.

This commit changes our default to align with that established practice.
If we improve the JIT (be it better costing or cheaper execution), we
can consider enabling it by default again.

Author: Jelte Fennema-Nio <postgres@jeltef.nl>
Discussion: https://postgr.es/m/DG1VZJEX1AQH.2EH4OKGRUDB71@jeltef.nl
doc/src/sgml/config.sgml
src/backend/jit/jit.c
src/backend/utils/misc/guc_parameters.dat
src/backend/utils/misc/postgresql.conf.sample