Hi,
On 2023-01-09 16:50:03 -0600, Ron Wilson wrote:
> The JSON query above was isolated to a single connection to trace the issue
> better.
> You can see in the image below that there is one connection that is growing
> memory usage over time and the rest are not.
> [image: Screen Shot 2023-01-09 at 4.22.48 PM.png]
> This image shows the memory growing on that single connection that the JSON
> is processed and the other connections that the memory used is stable and
> not growing. This is just before the connections are closed and opened
> again in the pool.
> [image: Screen Shot 2023-01-09 at 4.25.00 PM.png]
The easiest way (for us) to debug this further would be if you could provide
us with a memory context dump. Unfortunately in PG 13 the
pg_backend_memory_contexts view does not yet exist. So you'd have to gdb into
the backend, and execute
p MemoryContextStats(TopMemoryContext)
which will dump information to the server's stderr.
Greetings,
Andres Freund