diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2008-10-22 12:55:59 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2008-10-22 12:55:59 +0000 |
commit | 8a47932c3ea47f1dce8df10dfc424a199ada9110 (patch) | |
tree | d6654ca2fe4dac52264b4c66eabdf79cca6f3f55 /src/include/access/gist_private.h | |
parent | f189a122265a964cdd7f5ce44447afb9f45f1aa0 (diff) |
Fix GiST's killing tuple: GISTScanOpaque->curpos wasn't
correctly set. As result, killtuple() marks as dead
wrong tuple on page. Bug was introduced by me while fixing
possible duplicates during GiST index scan.
Diffstat (limited to 'src/include/access/gist_private.h')
-rw-r--r-- | src/include/access/gist_private.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index ee94875a342..cab33bc9b60 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.24.2.1 2008/08/23 10:41:38 teodor Exp $ + * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.24.2.2 2008/10/22 12:55:59 teodor Exp $ * *------------------------------------------------------------------------- */ @@ -60,6 +60,12 @@ typedef struct GISTSTATE TupleDesc tupdesc; } GISTSTATE; +typedef struct MatchedItemPtr +{ + ItemPointerData heapPtr; + OffsetNumber pageOffset; /* offset in index page */ +} MatchedItemPtr; + /* * When we're doing a scan, we need to keep track of the parent stack * for the marked and current items. @@ -74,10 +80,10 @@ typedef struct GISTScanOpaqueData Buffer curbuf; Buffer markbuf; - ItemPointerData pageData[BLCKSZ/sizeof(IndexTupleData)]; + MatchedItemPtr pageData[BLCKSZ/sizeof(IndexTupleData)]; OffsetNumber nPageData; OffsetNumber curPageData; - ItemPointerData markPageData[BLCKSZ/sizeof(IndexTupleData)]; + MatchedItemPtr markPageData[BLCKSZ/sizeof(IndexTupleData)]; OffsetNumber markNPageData; OffsetNumber markCurPageData; } GISTScanOpaqueData; |