pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo @ 2018-03-16 20:04 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-16 20:04 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_3_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/574386ddca69b4126e77f993d3d770c85f99d209 Modified Files -------------- src/backend/executor/nodeHash.c | 43 +++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 21 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo @ 2018-03-16 20:04 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-16 20:04 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/9e17bdb8a525ff89c4535cd153dc0f2fa813ea59 Modified Files -------------- src/backend/executor/nodeHash.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo @ 2018-03-16 20:04 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-16 20:04 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c17a58967d97461a088ca2f19da4c46cf35e4194 Modified Files -------------- src/backend/executor/nodeHash.c | 43 +++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 21 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo @ 2018-03-16 20:04 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-16 20:04 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bdc7f686d1b8f423cbd60a84cd839eca86475fd6 Modified Files -------------- src/backend/executor/nodeHash.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo @ 2018-03-16 20:04 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-16 20:04 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2709549ecdd68313201307653f3ddd0f24dd8427 Modified Files -------------- src/backend/executor/nodeHash.c | 43 +++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 21 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo @ 2018-03-16 20:04 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-16 20:04 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5149dc93467465e38645a5c318d7d90d806b5e53 Modified Files -------------- src/backend/executor/nodeHash.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-03-16 20:04 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-03-16 20:04 pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo Tom Lane <tgl@sss.pgh.pa.us> 2018-03-16 20:04 pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo Tom Lane <tgl@sss.pgh.pa.us> 2018-03-16 20:04 pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo Tom Lane <tgl@sss.pgh.pa.us> 2018-03-16 20:04 pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo Tom Lane <tgl@sss.pgh.pa.us> 2018-03-16 20:04 pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo Tom Lane <tgl@sss.pgh.pa.us> 2018-03-16 20:04 pgsql: Fix query-lifespan memory leakage in repeatedly executed hash jo Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox