summaryrefslogtreecommitdiff
path: root/src/backend/access/hash/hashscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/hash/hashscan.c')
-rw-r--r--src/backend/access/hash/hashscan.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/backend/access/hash/hashscan.c b/src/backend/access/hash/hashscan.c
index 649e42fbeb0..f4a91b5710f 100644
--- a/src/backend/access/hash/hashscan.c
+++ b/src/backend/access/hash/hashscan.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.24 2001/01/24 19:42:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.25 2001/07/15 22:48:15 tgl Exp $
*
* NOTES
* Because we can be doing an index scan on a relation while we
@@ -45,6 +45,31 @@ typedef HashScanListData *HashScanList;
static HashScanList HashScans = (HashScanList) NULL;
+
+/*
+ * AtEOXact_hash() --- clean up hash subsystem at xact abort or commit.
+ *
+ * This is here because it needs to touch this module's static var HashScans.
+ */
+void
+AtEOXact_hash(void)
+{
+ /*
+ * Note: these actions should only be necessary during xact abort; but
+ * they can't hurt during a commit.
+ */
+
+ /*
+ * Reset the active-scans list to empty. We do not need to free the
+ * list elements, because they're all palloc()'d, so they'll go away
+ * at end of transaction anyway.
+ */
+ HashScans = NULL;
+
+ /* If we were building a hash, we ain't anymore. */
+ BuildingHash = false;
+}
+
/*
* _Hash_regscan() -- register a new scan.
*/