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
> -
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