Re: [BUGS] BUG #7916: memory leak with array_agg

2013-03-05 Thread Sergey Burladyan
Tom Lane writes: > AFAICT there's no actual leak here; array_agg is just optimized for > speed rather than space. It eats about 8K per hashtable entry. > While the planner knows that, it's got no good idea how many groups > will be produced by the query, so it underestimates the space needed > -

Re: [BUGS] BUG #7916: memory leak with array_agg

2013-03-05 Thread Tom Lane
eshkin...@gmail.com writes: > Looks like array_agg have memory leak. In my example it eat 3 Gb RSS, but > equal user defined aggregate > created by myself use only 7Mb RSS. AFAICT there's no actual leak here; array_agg is just optimized for speed rather than space. It eats about 8K per hashtable