aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-08-26 15:04:05 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-08-26 15:04:10 -0400
commitbef2d627f30c0d854d02dc860b0d54fa3309d4ee (patch)
tree853464e5bf7070e31772bc85f63f069c0f98ea3b /src/backend/access/gist/gist.c
parent42ebdc8129f038e06e17d7b3da7fc11897323814 (diff)
downloadpostgresql-bef2d627f30c0d854d02dc860b0d54fa3309d4ee.tar.gz
postgresql-bef2d627f30c0d854d02dc860b0d54fa3309d4ee.zip
Fix potential memory leakage from HandleParallelMessages().
HandleParallelMessages leaked memory into the caller's context. Since it's called from ProcessInterrupts, there is basically zero certainty as to what CurrentMemoryContext is, which means we could be leaking into long-lived contexts. Over the processing of many worker messages that would grow to be a problem. Things could be even worse than just a leak, if we happened to service the interrupt while ErrorContext is current: elog.c thinks it can reset that on its own whim, possibly yanking storage out from under HandleParallelMessages. Give HandleParallelMessages its own dedicated context instead, which we can reset during each call to ensure there's no accumulation of wasted memory. Discussion: <16610.1472222135@sss.pgh.pa.us>
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions