Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [ NOT Fixed ]
От | Kirk Wolak |
---|---|
Тема | Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [ NOT Fixed ] |
Дата | |
Msg-id | CACLU5mQFkgttWBKGEh8SiEC2xUcmA+brKrvSMwk=BLrkgkGLtw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already] (Kirk Wolak <wolakk@gmail.com>) |
Ответы |
Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [ NOT Fixed ]
Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [ NOT Fixed ] |
Список | pgsql-hackers |
On Mon, Jan 22, 2024 at 1:30 AM Kirk Wolak <wolakk@gmail.com> wrote:
On Fri, Jan 19, 2024 at 7:03 PM Daniel Gustafsson <daniel@yesql.se> wrote:> On 19 Jan 2024, at 23:09, Kirk Wolak <wolakk@gmail.com> wrote:
...
./configure <other params> --with-llvm LLVM_CONFIG=/path/to/llvm-config
--
Daniel GustafssonThank 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);
}
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);
}
В списке pgsql-hackers по дате отправления: