Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Kirk Wolak <wolakk(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]
Date: 2024-01-19 09:20:50
Message-ID: 1ee3d7aa99dbf3e00cde474b95057b9d3bad25b1.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2024-01-18 at 19:50 -0500, Kirk Wolak wrote:
>   I did a little more checking and the reason I did not see the link MIGHT be because EXPLAIN did not show a JIT attempt.
> I tried to use settings that FORCE a JIT...  But to no avail.
>
>   I am now concerned that the problem is more hidden in my use case.  Meaning I CANNOT conclude it is fixed.
> But I know of NO WAY to force a JIT (I lowered costs to 1, etc.  ).
>
>   You don't know a way to force at least the JIT analysis to happen?  (because I already knew if JIT was off, the leak wouldn't happen). 

If you set the limits to 0, you can trigger it easily:

SET jit = on;
SET jit_above_cost = 0;
SET jit_inline_above_cost = 0;
SET jit_optimize_above_cost = 0;

EXPLAIN (ANALYZE) SELECT count(*) FROM foo;
QUERY PLAN
══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Finalize Aggregate (cost=58889.84..58889.85 rows=1 width=8) (actual time=400.462..418.214 rows=1 loops=1)
-> Gather (cost=58889.62..58889.83 rows=2 width=8) (actual time=400.300..418.190 rows=3 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Partial Aggregate (cost=57889.62..57889.64 rows=1 width=8) (actual time=384.876..384.878 rows=1 loops=3)
-> Parallel Seq Scan on foo (cost=0.00..52681.30 rows=2083330 width=0) (actual time=0.028..168.510 rows=1666667 loops=3)
Planning Time: 0.133 ms
JIT:
Functions: 8
Options: Inlining true, Optimization true, Expressions true, Deforming true
Timing: Generation 1.038 ms, Inlining 279.779 ms, Optimization 38.395 ms, Emission 73.105 ms, Total 392.316 ms
Execution Time: 478.257 ms

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2024-01-19 09:38:32 Re: Simplify documentation related to Windows builds
Previous Message Bertrand Drouvot 2024-01-19 09:03:01 Re: Test slots invalidations in 035_standby_logical_decoding.pl only if dead rows are removed