Re: Memory Accounting
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Melanie Plageman <melanieplageman@gmail.com>, Soumyadeep Chakraborty <sochakraborty@pivotal.io>,
Robert Haas <robertmhaas@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>, soumyadeep2007@gmail.com
Date: 2019-10-04T18:43:06Z
Lists: pgsql-hackers
On Fri, Oct 4, 2019 at 7:32 AM Jeff Davis <pgsql@j-davis.com> wrote: > The patch has been floating around for a very long time, so I don't > remember exactly why I chose a signed value. Sorry. I am reminded of the fact that int64 is used to size buffers within tuplesort.c, because it needs to support negative availMem sizes -- when huge allocations were first supported, tuplesort.c briefly used "Size", which didn't work. Perhaps it had something to do with that. -- Peter Geoghegan
Commits
-
Change MemoryContextMemAllocated to return Size
- 36425ece5d6c 13.0 landed
-
Use Size instead of int64 to track allocated memory
- f2369bc610a1 13.0 landed
-
Add transparent block-level memory accounting
- 5dd7fc151946 13.0 landed
-
Change the way pre-reading in external sort's merge phase works.
- e94568ecc10f 10.0 cited
-
Improve memory management for external sorts.
- 0011c0091e88 9.6.0 cited
-
In array_agg(), don't create a new context for every group.
- b419865a814a 9.5.0 cited