postgresql/src/backend/access
Tom Lane 78dcd027e8 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>
2016-08-26 15:04:05 -04:00
..
brin Final pgindent + perltidy run for 9.6. 2016-08-15 13:42:51 -04:00
common pgindent run for 9.6 2016-06-09 18:02:36 -04:00
gin Final pgindent + perltidy run for 9.6. 2016-08-15 13:42:51 -04:00
gist Suppress compiler warnings in non-cassert builds. 2016-08-23 23:21:10 -04:00
hash Final pgindent + perltidy run for 9.6. 2016-08-15 13:42:51 -04:00
heap Fix small query-lifespan memory leak in bulk updates. 2016-08-24 22:20:25 -04:00
index Add SQL-accessible functions for inspecting index AM properties. 2016-08-13 18:31:14 -04:00
nbtree Add SQL-accessible functions for inspecting index AM properties. 2016-08-13 18:31:14 -04:00
rmgrdesc Clear all-frozen visibilitymap status when locking tuples. 2016-07-18 02:01:13 -07:00
spgist Improve SP-GiST opclass API to better support unlabeled nodes. 2016-08-23 12:10:34 -04:00
tablesample Update copyright for 2016 2016-01-02 13:33:40 -05:00
transam Fix potential memory leakage from HandleParallelMessages(). 2016-08-26 15:04:05 -04:00
Makefile TABLESAMPLE, SQL Standard and extensible 2015-05-15 14:37:10 -04:00