Abhishek Mittal <abhmittal@gmail.com> writes:
> Please find the table schema below along with the attached sample CSV file.
I too tried to reproduce this, using both Junwang's \gexec method
and the C program. I don't see any leak. However, I tested v12
branch tip, so it's possible that you are hitting a problem that's
been fixed since 12.16. I notice a plausibly-related item in the
12.18 release notes:
Fix memory leak when performing JIT inlining (Andres Freund, Daniel Gustafsson)
If that's it, then setting "jit = off" should do as a temporary
workaround.
If updating to 12.20 does not resolve the problem, then we are
going to need more information. Is this straight community
Postgres, or some variant? If you built it yourself, what
options did you use? Do you have any extensions installed?
regards, tom lane