Stopgap patch for problem with cursors using hash joins: an ABORT
authorTom Lane <[email protected]>
Fri, 10 Nov 2000 04:08:25 +0000 (04:08 +0000)
committerTom Lane <[email protected]>
Fri, 10 Nov 2000 04:08:25 +0000 (04:08 +0000)
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.*.

src/backend/utils/mmgr/portalmem.c

index 71e94b7096d3f612630601f2453602004b6c950b..cc590b751fb9f0a8c69983f5e7e6368f5d0c963d 100644 (file)
@@ -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, "<hashtable ", 11) == 0)
+       return true;
    return false;
 }