summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-11-10 04:08:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-11-10 04:08:25 +0000
commitae585b5c37eac14a255e4f0a544f5b9418a7bafc (patch)
tree13155869ee95066a8154a1c53b11a97386703a9a
parentef6bee30c5700609396555732064f38dbe621f98 (diff)
downloadpostgresql-ae585b5c37eac14a255e4f0a544f5b9418a7bafc.tar.gz
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.*.
-rw-r--r--src/backend/utils/mmgr/portalmem.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c
index 71e94b7096..cc590b751f 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, "<hashtable ", 11) == 0)
+ return true;
return false;
}