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

From Jim Nasby
Subject Re: 9.5: Better memory accounting, towards memory-bounded HashAgg
Date
Msg-id 546BACE2.3070305@BlueTreble.com
Whole thread Raw
In response to Re: 9.5: Better memory accounting, towards memory-bounded HashAgg  (Tomas Vondra <tv@fuzzy.cz>)
List pgsql-hackers
On 11/17/14, 10:50 AM, Tomas Vondra wrote:
> Either of these restrictions would prevent a situation where a context
> has to update accounting for two parent contexts. That'd allow updating
> a single place (because each context has a single parent context with
> tracking requested).

Another option might be to be lazy on updating parent contexts. I'm thinking something like keep a boolean (or make a
sizeof 0 magic) that indicates whether a context has up-to-date info from it's children or not. That would allow you to
onlyupdate the complete size when you need it, but if your children haven't been touched since the last time you
calculatedthen you're don't need to recalc.
 
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Adam Brightwell
Date:
Subject: Re: Additional role attributes && superuser review
Next
From: Jeff Janes
Date:
Subject: pg_test_fsync file descriptor leak