OSDN Git Service

Fix a small memory leak in ExecReScanAgg() in the hashed aggregation case.
authorNeil Conway <neilc@samurai.com>
Thu, 16 Oct 2008 19:25:55 +0000 (19:25 +0000)
committerNeil Conway <neilc@samurai.com>
Thu, 16 Oct 2008 19:25:55 +0000 (19:25 +0000)
commite034e517a70265a2e7f9552d2a9fd33102d21896
tree7e4abf8c46fa6e7d61c0eebc22a29547e1a90cae
parent0e3d5ad477a172c5cb8965ffc5c9298b0e86c466
Fix a small memory leak in ExecReScanAgg() in the hashed aggregation case.
In the previous coding, the list of columns that needed to be hashed on
was allocated in the per-query context, but we reallocated every time
the Agg node was rescanned. Since this information doesn't change over
a rescan, just construct the list of columns once during ExecInitAgg().
src/backend/executor/nodeAgg.c