From: | Kirk Wolak <wolakk(at)gmail(dot)com> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, 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 [ NOT Fixed ] |
Date: | 2024-01-24 19:50:52 |
Message-ID: | CACLU5mQFkgttWBKGEh8SiEC2xUcmA+brKrvSMwk=BLrkgkGLtw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 22, 2024 at 1:30 AM Kirk Wolak <wolakk(at)gmail(dot)com> wrote:
> On Fri, Jan 19, 2024 at 7:03 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
>> > On 19 Jan 2024, at 23:09, Kirk Wolak <wolakk(at)gmail(dot)com> wrote:
>>
>> ...
>> ./configure <other params> --with-llvm
>> LLVM_CONFIG=/path/to/llvm-config
>>
>> --
>> Daniel Gustafsson
>>
>
> Thank you, that made it possible to build and run...
> UNFORTUNATELY this has a CLEAR memory leak (visible in htop)
> I am watching it already consuming 6% of my system memory.
>
>
Daniel,
In the previous email, I made note that once the JIT was enabled, the
problem exists in 17Devel.
I re-included my script, which forced the JIT to be used...
I attached an updated script that forced the settings.
But this is still leaking memory (outside of the
pg_backend_memory_context() calls).
Probably because it's at the LLVM level? And it does NOT happen from
planning/opening the query. It appears I have to fetch the rows to see the
problem.
Thanks in advance. Let me know if I should be doing something different?
Kirk Out!
PS: I was wondering if we had a function that showed total memory of the
backend. For helping to determine if we might have a 3rd party leak?
[increase in total memory consumed not noticed by
pg_backend_memory_contexts)
#include "postgres.h"
#include <sys/resource.h>
PG_MODULE_MAGIC;
PG_FUNCTION_INFO_V1(pg_backend_memory_footprint);
Datum pg_backend_memory_footprint(PG_FUNCTION_ARGS) {
long memory_usage_bytes = 0;
struct rusage usage;
getrusage(RUSAGE_SELF, &usage);
memory_usage_bytes = usage.ru_maxrss * 1024;
PG_RETURN_INT64(memory_usage_bytes);
}
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2024-01-24 19:59:44 | Re: Emit fewer vacuum records by reaping removable tuples during pruning |
Previous Message | Andres Freund | 2024-01-24 19:46:49 | Re: s_lock_test no longer works |