From 0147b1934f251183d3614bca011bf21205890835 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 22 Aug 2000 04:06:22 +0000 Subject: Fix a many-legged critter reported by chifungfan@yahoo.com: under the right circumstances a hash join executed as a DECLARE CURSOR/FETCH query would crash the backend. Problem as seen in current sources was that the hash tables were stored in a context that was a child of TransactionCommandContext, which got zapped at completion of the FETCH command --- but cursor cleanup executed at COMMIT expected the tables to still be valid. I haven't chased down the details as seen in 7.0.* but I'm sure it's the same general problem. --- src/include/executor/hashjoin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/executor') diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h index 8d4cb98469f..25a8174f294 100644 --- a/src/include/executor/hashjoin.h +++ b/src/include/executor/hashjoin.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: hashjoin.h,v 1.18 2000/07/12 02:37:30 tgl Exp $ + * $Id: hashjoin.h,v 1.19 2000/08/22 04:06:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -26,7 +26,7 @@ * This makes it easy and fast to release the storage when we don't need it * anymore. * - * The contexts are made children of TransactionCommandContext, ensuring + * The hashtable contexts are made children of the per-query context, ensuring * that they will be discarded at end of statement even if the join is * aborted early by an error. (Likewise, any temporary files we make will * be cleaned up by the virtual file manager in event of an error.) -- cgit v1.2.3