"Chris Spotts" <rfusca(at)gmail(dot)com> writes:
>> many groups are you expecting in that query? Does the plan for the
>> array_agg query show hash or group aggregation?
> GroupAggregate
Huh, there's no reason it should take much memory then. Maybe you've
found a memory leak. Can you put together a self-contained test case?
regards, tom lane