diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-02 21:42:18 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-02 21:42:18 +0000 |
commit | 946fdc000e2b2e1218c4d31588eaa089ca3439b5 (patch) | |
tree | 36c35b3ab54a0147723b57d6e42ca8e8f812d9ca /src/backend | |
parent | 9aa30e7109b83aa8475746b59e6336d9f5e260b8 (diff) | |
download | postgresql-946fdc000e2b2e1218c4d31588eaa089ca3439b5.tar.gz postgresql-946fdc000e2b2e1218c4d31588eaa089ca3439b5.zip |
Fix not-quite-right Assertion. Did not work at all in extended-query
mode (per complaint from Kris Jurka) and it was only by chance that it
didn't fail in simple-query mode. A COMMIT or ROLLBACK has to be
executed by a portal, therefore it's wrong to suppose that there aren't
any live portals at CleanupTransaction time.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/utils/mmgr/portalmem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index 2093dc2a463..11abf52b870 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -12,7 +12,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.67 2004/07/17 03:29:46 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.68 2004/08/02 21:42:18 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -556,10 +556,6 @@ AtCleanup_Portals(void) { Portal portal = hentry->portal; - /* AtAbort_Portals should have fixed these: */ - Assert(portal->status != PORTAL_ACTIVE); - Assert(portal->resowner == NULL); - /* * Do nothing else to cursors held over from a previous * transaction. (This test must include checking CURSOR_OPT_HOLD, @@ -568,7 +564,11 @@ AtCleanup_Portals(void) */ if (portal->createXact != xact && (portal->cursorOptions & CURSOR_OPT_HOLD)) + { + Assert(portal->status != PORTAL_ACTIVE); + Assert(portal->resowner == NULL); continue; + } /* Else zap it. */ PortalDrop(portal, false); |