summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2008-11-30 18:49:36 +0000
committerTom Lane2008-11-30 18:49:36 +0000
commit0ddede58e6e7a39438b83469ec74928900767a86 (patch)
tree91087efeb448ff9226fa19176bc6df3df86c845d
parent0a2cdbcd7d7a994986a787e8b3e088dd64c90785 (diff)
Remove inappropriate memory context switch in shutdown_MultiFuncCall().
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.
-rw-r--r--src/backend/utils/fmgr/funcapi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c
index 52b3bafb114..60aeff5b665 100644
--- a/src/backend/utils/fmgr/funcapi.c
+++ b/src/backend/utils/fmgr/funcapi.c
@@ -7,7 +7,7 @@
* Copyright (c) 2002-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.42 2008/08/25 22:42:34 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.43 2008/11/30 18:49:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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);
}