summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTom Lane2016-08-26 19:04:05 +0000
committerTom Lane2016-08-26 19:04:05 +0000
commit78dcd027e8f7ed213f69da932853dc4b7cb9cb44 (patch)
treeb2789c142651d24d024400ce6145f8412bac6050 /contrib
parent45a36e68539dcd7095a257b49f6f38ae77dec30d (diff)
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: <[email protected]>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions