Is there a way to check how much of process memory is allocated for the specific buffer for a running postgres session (work memory, temp buffers, plan cache etc ... )?

I'm asking because i want to check what's eating memory of one running query (it raises to couple of GB). One time it happened to be just an SQL that had more than 4GB of bind variables and just loading that sql caused OOM of the process. Other times it could be workmem going crazy due to huge number of sorts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.