Hi!
Some help you could get from
https://github.com/postgrespro/memstat
Vladimir Sitnikov wrote:
> Hi,
>
> I investigate an out of memory-related case for PostgreSQL 9.6.5, and it
> looks like MemoryContextStatsDetail + gdb are the only friends there.
> --
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/