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

Commitc5c1cc3

Browse files
committed
This patch will ensure that the hash table iteration performed by
AtCommit_Portals is restarted when a portal is deleted. This isnecessary since the deletion of a portal may cause the deletion ofanother which on rare occations may cause the iterator to return adeleted portal an thus a renewed attempt delete.Thomas Hallgren
1 parentbe1cc69 commitc5c1cc3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 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.78 2005/04/1119:51:15 tgl Exp $
15+
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.79 2005/05/1118:05:37 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -475,12 +475,6 @@ CommitHoldablePortals(void)
475475
*
476476
* Remove all non-holdable portals created in this transaction.
477477
* Portals remaining from prior transactions should be left untouched.
478-
*
479-
* XXX This assumes that portals can be deleted in a random order, ie,
480-
* no portal has a reference to any other (at least not one that will be
481-
* exercised during deletion).I think this is okay at the moment, but
482-
* we've had bugs of that ilk in the past. Keep a close eye on cursor
483-
* references...
484478
*/
485479
void
486480
AtCommit_Portals(void)
@@ -516,6 +510,9 @@ AtCommit_Portals(void)
516510

517511
/* Zap all non-holdable portals */
518512
PortalDrop(portal, true);
513+
514+
/* Restart the iteration */
515+
hash_seq_init(&status,PortalHashTable);
519516
}
520517
}
521518

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp