Re: JIT compiling with LLVM v11 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: JIT compiling with LLVM v11
Date
Msg-id f6c72d9c-8b1c-cc1c-258b-7dcf9bdd3952@2ndquadrant.com
Whole thread Raw
In response to Re: JIT compiling with LLVM v11  (Andres Freund <andres@anarazel.de>)
Responses Re: JIT compiling with LLVM v11
List pgsql-hackers
On 3/11/18 14:25, Andres Freund wrote:
>> It's perhaps a bit confusing that some of the jit_* settings take effect
>> at plan time and some at execution time.  At the moment, this mainly
>> affects me reading the code ;-), but it would also have some effect on
>> prepared statements and such.
> Not quite sure what you mean?

I haven't tested this, but what appears to be the case is that

SET jit_above_cost = 0;
PREPARE foo AS SELECT ....;
SET jit_above_cost = infinity;
EXECUTE foo;

will use JIT, because jit_above_cost applies at plan time, whereas

SET jit_expressions = on;
PREPARE foo AS SELECT ....;
SET jit_expressions = off;
EXECUTE foo;

will *not* use JIT, becaue jit_expressions applies at execution time.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Transform for pl/perl
Next
From: Darafei "Komяpa" Praliaskouski
Date:
Subject: Re: Cast jsonb to numeric, int, float, bool