From: Tom Lane Date: Fri, 10 Nov 2000 04:08:25 +0000 (+0000) Subject: Stopgap patch for problem with cursors using hash joins: an ABORT X-Git-Tag: REL7_0_3~1 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=ae585b5c37eac14a255e4f0a544f5b9418a7bafc;p=postgresql.git 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.*. --- diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index 71e94b7096d..cc590b751fb 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.36 2000/04/12 17:16:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.36.2.1 2000/11/10 04:08:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -413,6 +413,12 @@ PortalNameIsSpecial(char *pname) return true; if (strcmp(pname, TRUNCPNAME) == 0) return true; + /* + * Quick hack for 7.0.3: treat hashtable portals as special + * so that CollectNamedPortals() won't try to delete them. + */ + if (strncmp(pname, "