pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: jit: Change the default to off.
Date: Thu, 02 Apr 2026 11:47:43 +0000
Message-ID: <E1w8GWU-002bSL-31@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7f8c88c2b872cb74882ab93dcb05529dab2a10bc

Modified Files
--------------
doc/src/sgml/config.sgml                      | 2 +-
src/backend/jit/jit.c                         | 2 +-
src/backend/utils/misc/guc_parameters.dat     | 2 +-
src/backend/utils/misc/postgresql.conf.sample | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)



Message-ID: <E1w8GWU-002bSL-31@gemulon.postgresql.org>
Permalink:  ../E1w8GWU-002bSL-31@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w8GWU-002bSL-31@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tomas.vondra@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: jit: Change the default to off.
  In-Reply-To: <E1w8GWU-002bSL-31@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox