diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-11-01 22:30:54 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-11-01 22:30:54 +0000 |
| commit | 7d535ebe5bf95ca88891c0288fa1c6575498185e (patch) | |
| tree | 3b26f8d66fde2c0c192c3df03691b0ff28c5a747 /src/backend/access/hash/hashsearch.c | |
| parent | c4afdca4c26df63e4942ef300e544c7118c6af56 (diff) | |
| download | postgresql-7d535ebe5bf95ca88891c0288fa1c6575498185e.tar.gz | |
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.
Diffstat (limited to 'src/backend/access/hash/hashsearch.c')
| -rw-r--r-- | src/backend/access/hash/hashsearch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/hash/hashsearch.c b/src/backend/access/hash/hashsearch.c index fec2f5d78a..eadd45750a 100644 --- a/src/backend/access/hash/hashsearch.c +++ b/src/backend/access/hash/hashsearch.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.57 2009/06/11 14:48:53 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.58 2009/11/01 22:30:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -58,7 +58,7 @@ _hash_next(IndexScanDesc scan, ScanDirection dir) _hash_checkpage(rel, buf, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE); page = BufferGetPage(buf); itup = (IndexTuple) PageGetItem(page, PageGetItemId(page, offnum)); - scan->xs_ctup.t_self = itup->t_tid; + so->hashso_heappos = itup->t_tid; return true; } @@ -242,7 +242,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir) _hash_checkpage(rel, buf, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE); page = BufferGetPage(buf); itup = (IndexTuple) PageGetItem(page, PageGetItemId(page, offnum)); - scan->xs_ctup.t_self = itup->t_tid; + so->hashso_heappos = itup->t_tid; return true; } |
