aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-03-16 16:03:45 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-03-16 16:03:45 -0400
commit9e17bdb8a525ff89c4535cd153dc0f2fa813ea59 (patch)
treefa5a9fe98ac0d78726835566b039c04ed7962125 /src/backend/commands/explain.c
parent013c0baaddd9df7e1f940184a8ab8e478214b46c (diff)
downloadpostgresql-9e17bdb8a525ff89c4535cd153dc0f2fa813ea59.tar.gz
postgresql-9e17bdb8a525ff89c4535cd153dc0f2fa813ea59.zip
Fix query-lifespan memory leakage in repeatedly executed hash joins.
ExecHashTableCreate allocated some memory that wasn't freed by ExecHashTableDestroy, specifically the per-hash-key function information. That's not a huge amount of data, but if one runs a query that repeats a hash join enough times, it builds up. Fix by arranging for the data in question to be kept in the hashtable's hashCxt instead of leaving it "loose" in the query-lifespan executor context. (This ensures that we'll also clean up anything that the hash functions allocate in fn_mcxt.) Per report from Amit Khandekar. It's been like this forever, so back-patch to all supported branches. Discussion: https://postgr.es/m/CAJ3gD9cFofAWGvcxLOxDHC=B0hjtW8yGmUsF2hdGh97CM38=7g@mail.gmail.com
Diffstat (limited to 'src/backend/commands/explain.c')
0 files changed, 0 insertions, 0 deletions