summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xact.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r--src/backend/access/transam/xact.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index c9e16daa0d7..b6e19d614e2 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.50 1999/09/05 17:12:34 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.51 1999/09/09 16:25:35 tgl Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
@@ -694,19 +694,13 @@ static void
AtCommit_Memory()
{
Portal portal;
- MemoryContext portalContext;
/* ----------------
- * Release memory in the blank portal.
- * Since EndPortalAllocMode implicitly works on the current context,
- * first make real sure that the blank portal is the selected context.
- * (This is probably not necessary, but seems like a good idea...)
+ * Release all heap memory in the blank portal.
* ----------------
*/
portal = GetPortalByName(NULL);
- portalContext = (MemoryContext) PortalGetHeapMemory(portal);
- MemoryContextSwitchTo(portalContext);
- EndPortalAllocMode();
+ PortalResetHeapMemory(portal);
/* ----------------
* Now that we're "out" of a transaction, have the
@@ -784,19 +778,13 @@ static void
AtAbort_Memory()
{
Portal portal;
- MemoryContext portalContext;
/* ----------------
- * Release memory in the blank portal.
- * Since EndPortalAllocMode implicitly works on the current context,
- * first make real sure that the blank portal is the selected context.
- * (This is ESSENTIAL in case we aborted from someplace where it wasn't.)
+ * Release all heap memory in the blank portal.
* ----------------
*/
portal = GetPortalByName(NULL);
- portalContext = (MemoryContext) PortalGetHeapMemory(portal);
- MemoryContextSwitchTo(portalContext);
- EndPortalAllocMode();
+ PortalResetHeapMemory(portal);
/* ----------------
* Now that we're "out" of a transaction, have the