Re: 9.5: Better memory accounting, towards memory-bounded HashAgg - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: 9.5: Better memory accounting, towards memory-bounded HashAgg
Date
Msg-id CAB7nPqSvgxaqDz722rRRA1-c9TGBU3CofCn8g+OHOA7SfORrOQ@mail.gmail.com
Whole thread Raw
In response to Re: 9.5: Better memory accounting, towards memory-bounded HashAgg  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: 9.5: Better memory accounting, towards memory-bounded HashAgg  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Tue, Dec 2, 2014 at 2:14 PM, Jeff Davis <pgsql@j-davis.com> wrote:
> On Sun, 2014-11-30 at 17:49 -0800, Peter Geoghegan wrote:
>> On Mon, Nov 17, 2014 at 11:39 PM, Jeff Davis <pgsql@j-davis.com> wrote:
>> > I can also just move isReset there, and keep mem_allocated as a uint64.
>> > That way, if I find later that I want to track the aggregated value for
>> > the child contexts as well, I can split it into two uint32s. I'll hold
>> > off any any such optimizations until I see some numbers from HashAgg
>> > though.
>>
>> I took a quick look at memory-accounting-v8.patch.
>>
>> Is there some reason why mem_allocated is a uint64? All other things
>> being equal, I'd follow the example of tuplesort.c's
>> MemoryContextAllocHuge() API, which (following bugfix commit
>> 79e0f87a1) uses int64 variables to track available memory and so on.
>
> No reason. New version attached; that's the only change.
Note that I am marking this patch back to "Needs Review" state. I
doesn't seem that this patch has been reviewed completely.
-- 
Michael



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Support UPDATE table SET(*)=...
Next
From: Michael Paquier
Date:
Subject: Re: Role Attribute Bitmask Catalog Representation