8000 Stopgap patch for problem with cursors using hash joins: an ABORT · percona/postgres@ae585b5 · GitHub
[go: up one dir, main page]

Skip to content

Commit ae585b5

Browse files
committed
Stopgap patch for problem with cursors using hash joins: an ABORT
would cause two attempts to delete the hashtable portal, one from query shutdown and one from portalmem.c. Fix by making hash portals be treated as 'special' portal names, so that CollectNamedPortals will not think it should delete them. This code is in need of complete rewrite (and is already largely rewritten in current sources), but still need to put a finger in the dike for 7.0.*.
1 parent ef6bee3 commit ae585b5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/backend/utils/mmgr/portalmem.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.36 2000/04/12 17:16:10 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.36.2.1 2000/11/10 04:08:25 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -413,6 +413,12 @@ PortalNameIsSpecial(char *pname)
413413
return true;
414414
if (strcmp(pname, TRUNCPNAME) == 0)
415415
return true;
416+
/*
417+
* Quick hack for 7.0.3: treat hashtable portals as special
418+
* so that CollectNamedPortals() won't try to delete them.
419+
*/
420+
if (strncmp(pname, "<hashtable ", 11) == 0)
421+
return true;
416422
return false;
417423
}
418424

0 commit comments

Comments
 (0)
0