# 
# patch "src/backend/executor/nodeAgg.c"
#  from [851fd2d59a89ee2e3c23a1ca8fdbf4d466f98d26]
#    to [532ce100a0de1288fb23acc8de3a6bcac0982ec3]
# 
--- src/backend/executor/nodeAgg.c
+++ src/backend/executor/nodeAgg.c
@@ -350,10 +350,10 @@
 			return;
 		}
 	}
-
+#if 0
 	/* We run the transition functions in per-input-tuple memory context */
 	oldContext = MemoryContextSwitchTo(aggstate->tmpcontext->ecxt_per_tuple_memory);
-
+#endif
 	/*
 	 * OK to call the transition function
 	 *
@@ -375,6 +375,7 @@
 
 	newVal = FunctionCallInvoke(&fcinfo);
 
+#if 0
 	/*
 	 * If pass-by-ref datatype, must copy the new value into aggcontext
 	 * and pfree the prior transValue.	But if transfn returned a pointer
@@ -393,11 +394,13 @@
 		if (!pergroupstate->transValueIsNull)
 			pfree(DatumGetPointer(pergroupstate->transValue));
 	}
+#endif
 
 	pergroupstate->transValue = newVal;
 	pergroupstate->transValueIsNull = fcinfo.isnull;
-
+#if 0
 	MemoryContextSwitchTo(oldContext);
+#endif
 }
 
 /*
