Fix a small memory leak in ExecReScanAgg() in the hashed aggregation case.

Neil Conway <neilc@samurai.com>

Commit: 6a6f47d00a7505e1b5d562321386253133e05367
Author: Neil Conway <neilc@samurai.com>
Date: 2008-10-16T19:25:58Z
Releases: 8.3.5
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().

Files

PathChange+/−
src/backend/executor/nodeAgg.c modified +39 −28