Re: 9.5: Better memory accounting, towards memory-bounded HashAgg

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 9.5: Better memory accounting, towards memory-bounded HashAgg
Date: 2014-11-18 20:32:34
Message-ID: 546BACE2.3070305@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 size of 0 magic) that indicates whether a context has up-to-date info from it's children or not. That would allow you to only update the complete size when you need it, but if your children haven't been touched since the last time you calculated then you're don't need to recalc.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2014-11-18 20:41:28 pg_test_fsync file descriptor leak
Previous Message Adam Brightwell 2014-11-18 20:30:04 Re: Additional role attributes && superuser review