projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98a1f6b
)
Remove inappropriate memory context switch in shutdown_MultiFuncCall().
author
Tom Lane
<
[email protected]
>
Sun, 30 Nov 2008 18:49:48 +0000
(18:49 +0000)
committer
Tom Lane
<
[email protected]
>
Sun, 30 Nov 2008 18:49:48 +0000
(18:49 +0000)
This was a thinko introduced in a patch from last February; it results
in memory leakage if an SRF is shut down before the actual end of query,
because subsequent code will be running in a longer-lived context than
it's expecting to be.
src/backend/utils/fmgr/funcapi.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/fmgr/funcapi.c
b/src/backend/utils/fmgr/funcapi.c
index aa8341ebf41e8088f66a570d513b56c69610e967..f8f9cd2fdaca65393d345f1c3b2bd0cc0c100ff3 100644
(file)
--- a/
src/backend/utils/fmgr/funcapi.c
+++ b/
src/backend/utils/fmgr/funcapi.c
@@
-182,7
+182,6
@@
shutdown_MultiFuncCall(Datum arg)
* Delete context that holds all multi-call data, including the
* FuncCallContext itself
*/
- MemoryContextSwitchTo(flinfo->fn_mcxt);
MemoryContextDelete(funcctx->multi_call_memory_ctx);
}