diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2008-10-22 12:54:25 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2008-10-22 12:54:25 +0000 |
commit | 666aad267b6a5abdf808524f563189cef0d9e90e (patch) | |
tree | 3c6c8b2d115a3f6dcea39a610288f93e7a927667 /src/include/access/gist_private.h | |
parent | 6a112282b9526066707bd6633db40e36ba3ea97b (diff) | |
download | postgresql-666aad267b6a5abdf808524f563189cef0d9e90e.tar.gz postgresql-666aad267b6a5abdf808524f563189cef0d9e90e.zip |
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 1f4ceab37e9..b231492d7a9 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.28.2.2 2008/10/17 17:02:42 teodor Exp $ + * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.28.2.3 2008/10/22 12:54:25 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. @@ -77,10 +83,10 @@ typedef struct GISTScanOpaqueData Buffer markbuf; ItemPointerData markpos; - 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; |