On 1.4.2014 20:56, Tom Lane wrote: > Tomas Vondra <t...@fuzzy.cz> writes: >> On 1.4.2014 19:08, Tom Lane wrote: > You're conveniently ignoring the callers that set release=true. > Reverse engineering a query that exhibits memory bloat is left > as an exercise for the reader (but in a quick look, I'll bet > ARRAY_SUBLINK subplans are one locus for problems).
No, I'm not. I explicitly mentioned those cases (although you're right I concentrated mostly on cases with release=false, because of array_agg). > It's possible that it'd work to use a subcontext only if > release=true; I've not dug through the code enough to convince myself > of that. Maybe, though 'release' is not available in makeArrayResult() which is where the memory context needs to be decided. So all the callers would need to be modified to supply this parameter. But there only ~15 places where makeArrayResult is called. regards Tomas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers