"Spotts, Christopher" <Christopher.Spotts@TransCore.com> writes:
> Using postgres 8.4.1, I thought the upgrade from 8.4.0 would help with
> array_agg.
> Using ARRAY() with a subselect is yielding results hundreds times faster
> than array_agg even though its plan looks much worse...
Huh, you sure your server is on 8.4.1? I can't reproduce any memory
leak here (not that you've provided a self-contained example).
regards, tom lane