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;