From 7d535ebe5bf95ca88891c0288fa1c6575498185e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 1 Nov 2009 22:30:54 +0000 Subject: Dept of second thoughts: after studying index_getnext() a bit more I realize that it can scribble on scan->xs_ctup.t_self while following HOT chains, so we can't rely on that to stay valid between hashgettuple() calls. Introduce a private variable in HashScanOpaque, instead. --- src/include/access/hash.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/access/hash.h b/src/include/access/hash.h index 100ccb9e6d..ce5417044a 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/hash.h,v 1.94 2009/11/01 21:25:25 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/hash.h,v 1.95 2009/11/01 22:30:54 tgl Exp $ * * NOTES * modeled after Margo Seltzer's hash implementation for unix. @@ -99,8 +99,11 @@ typedef struct HashScanOpaqueData */ Buffer hashso_curbuf; - /* Current position of the scan */ + /* Current position of the scan, as an index TID */ ItemPointerData hashso_curpos; + + /* Current position of the scan, as a heap TID */ + ItemPointerData hashso_heappos; } HashScanOpaqueData; typedef HashScanOpaqueData *HashScanOpaque; -- cgit v1.2.1