Re: 9.5: Memory-bounded HashAgg - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 9.5: Memory-bounded HashAgg
Date
Msg-id 6172.1408035217@sss.pgh.pa.us
Whole thread Raw
In response to Re: 9.5: Memory-bounded HashAgg  ("Tomas Vondra" <tv@fuzzy.cz>)
Responses Re: 9.5: Memory-bounded HashAgg
List pgsql-hackers
"Tomas Vondra" <tv@fuzzy.cz> writes:
> On 14 Srpen 2014, 18:12, Tom Lane wrote:
>> Not sure that I follow your point.  You're going to have to deal with that
>> no matter what, no?

> That is not how the patch work. Once the memory consumption hits work_mem,
> it keeps the already existing groups in memory, and only stops creating
> new groups.

Oh?  So if we have aggregates like array_agg whose memory footprint
increases over time, the patch completely fails to avoid bloat?

I might think a patch with such a limitation was useful, if it weren't
for the fact that aggregates of that nature are a large part of the
cases where the planner misestimates the table size in the first place.
Any complication that we add to nodeAgg should be directed towards
dealing with cases that the planner is likely to get wrong.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: 9.5: Better memory accounting, towards memory-bounded HashAgg
Next
From: Jeff Davis
Date:
Subject: Re: 9.5: Memory-bounded HashAgg