Re: Make MemoryContextMemAllocated() more precise
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Tomas Vondra <tomas.vondra@postgresql.org>
Date: 2020-03-19T20:04:46Z
Lists: pgsql-hackers
On Thu, Mar 19, 2020 at 3:44 PM Jeff Davis <pgsql@j-davis.com> wrote: > On Thu, 2020-03-19 at 15:26 -0400, Robert Haas wrote: > > 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. > > MemoryContextStats() was unaffected by my now-reverted change. Oh. Well, that addresses my concern, then. If this only affects the accounting for memory-bounded hash aggregation and nothing else is going to be touched, including MemoryContextStats(), then it's not an issue for me. Other people may have different concerns, but that was the only thing that was bothering me. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Create memory context for HashAgg with a reasonable maxBlockSize.
- 50a38f65177e 13.0 landed
-
Specialize MemoryContextMemAllocated().
- e00912e11a9e 13.0 landed