Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit946fdc0

Browse files
committed
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 itdidn't fail in simple-query mode. A COMMIT or ROLLBACK has to beexecuted by a portal, therefore it's wrong to suppose that there aren'tany live portals at CleanupTransaction time.
1 parent9aa30e7 commit946fdc0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/backend/utils/mmgr/portalmem.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.67 2004/07/17 03:29:46 tgl Exp $
15+
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.68 2004/08/02 21:42:18 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -556,10 +556,6 @@ AtCleanup_Portals(void)
556556
{
557557
Portalportal=hentry->portal;
558558

559-
/* AtAbort_Portals should have fixed these: */
560-
Assert(portal->status!=PORTAL_ACTIVE);
561-
Assert(portal->resowner==NULL);
562-
563559
/*
564560
* Do nothing else to cursors held over from a previous
565561
* transaction. (This test must include checking CURSOR_OPT_HOLD,
@@ -568,7 +564,11 @@ AtCleanup_Portals(void)
568564
*/
569565
if (portal->createXact!=xact&&
570566
(portal->cursorOptions&CURSOR_OPT_HOLD))
567+
{
568+
Assert(portal->status!=PORTAL_ACTIVE);
569+
Assert(portal->resowner==NULL);
571570
continue;
571+
}
572572

573573
/* Else zap it. */
574574
PortalDrop(portal, false);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp