Describe the bug
There is a memory leak while using pgx Select Scans. There is a consistent increase of memory usage by the package. Here is a pprof dump -
These are the top memory users in my application. The query I make is quite simple and is just made once every 30 minutes. The package does seem to be leaking the memory on every query though.
To Reproduce
Steps to reproduce the behavior:
You can probably just make a large query again and again and pprof the process to see the memory usage.
Expected behavior
Memory should only be used ephemerally by the package.
Actual behavior
Gigs of memory leak
Version
Go: go 1.21
PostgreSQL: pg 14
pgx: github.com/jackc/pgx/v5 v5.5.5
Additional context
Add any other context about the problem here.
Are you sure this is showing current memory usage? I think it is actually showing you total allocations. As in, this isn't a leak, it is a lot of allocations which are being garbage collected.
Describe the bug There is a memory leak while using pgx Select Scans. There is a consistent increase of memory usage by the package. Here is a pprof dump -
These are the top memory users in my application. The query I make is quite simple and is just made once every 30 minutes. The package does seem to be leaking the memory on every query though.
To Reproduce Steps to reproduce the behavior: You can probably just make a large query again and again and pprof the process to see the memory usage.
Expected behavior Memory should only be used ephemerally by the package.
Actual behavior Gigs of memory leak Version
Go: go 1.21
PostgreSQL: pg 14
pgx: github.com/jackc/pgx/v5 v5.5.5
Additional context Add any other context about the problem here.