Re: Make MemoryContextMemAllocated() more precise - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Make MemoryContextMemAllocated() more precise
Date
Msg-id CA+TgmoYt-dPg+kZM7uFeuYGW0T+bysJdeaPtxCZ1y1w2SBsptg@mail.gmail.com
Whole thread Raw
In response to Re: Make MemoryContextMemAllocated() more precise  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Make MemoryContextMemAllocated() more precise  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Thu, Mar 19, 2020 at 2:11 PM Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> My understanding is that this is really just an accounting issue, where
> allocating a block would get us over the limit, which I suppose might be
> an issue with low work_mem values.

Well, the issue is, if I understand correctly, that this means that
MemoryContextStats() might now report a smaller amount of memory than
what we actually allocated from the operating system. That seems like
it might lead someone trying to figure out where a backend is leaking
memory to erroneous conclusions.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Make MemoryContextMemAllocated() more precise
Next
From: Jeff Davis
Date:
Subject: Re: Make MemoryContextMemAllocated() more precise