]> granicus.if.org Git - postgresql/commit
Fix memory leak in ARRAY(SELECT ...) subqueries.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 21 Jun 2012 21:26:19 +0000 (17:26 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 21 Jun 2012 21:26:19 +0000 (17:26 -0400)
commitdf83f0f61c5e44602fa879626c79751b198237c5
tree833554eb1b54856660bf2a48f5b74c1bccc541ab
parent348f5043173260d438735e3a9e4a8ef1bd099686
Fix memory leak in ARRAY(SELECT ...) subqueries.

Repeated execution of an uncorrelated ARRAY_SUBLINK sub-select (which
I think can only happen if the sub-select is embedded in a larger,
correlated subquery) would leak memory for the duration of the query,
due to not reclaiming the array generated in the previous execution.
Per bug #6698 from Armando Miraglia.  Diagnosis and fix idea by Heikki,
patch itself by me.

This has been like this all along, so back-patch to all supported versions.
src/backend/executor/nodeSubplan.c
src/include/nodes/execnodes.h