Re: Make MemoryContextMemAllocated() more precise
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Tomas Vondra <tomas.vondra@postgresql.org>
Date: 2020-03-19T19:27:50Z
Lists: pgsql-hackers
On Thu, 2020-03-19 at 11:44 -0400, Robert Haas wrote: > Procedurally, I think that it is highly inappropriate to submit a > patch two weeks after the start of the final CommitFest and then > commit it just over 48 hours later without a single endorsement of > the > change from anyone. Reverted. Sorry, I misjudged this as a "supporting fix for a specific problem", but it seems others feel it requires discussion. > Substantively, I think that whether or not this is improvement > depends > considerably on how your OS handles overcommit. I do not have enough > knowledge to know whether it will be better in general, but would > welcome opinions from others. I think omitting the tail of the current block is an unqualified improvement for the purpose of obeying work_mem, regardless of the OS. The block sizes keep doubling up to 8MB, and it doesn't make a lot of sense to count that last large mostly-empty block against work_mem. Regards, Jeff Davis
Commits
-
Create memory context for HashAgg with a reasonable maxBlockSize.
- 50a38f65177e 13.0 landed
-
Specialize MemoryContextMemAllocated().
- e00912e11a9e 13.0 landed