diff options
| author | Teodor Sigaev | 2008-08-23 10:43:58 +0000 |
|---|---|---|
| committer | Teodor Sigaev | 2008-08-23 10:43:58 +0000 |
| commit | 691ba06047d445bac85e587e02bf9bd37ca84dd3 (patch) | |
| tree | 70e31317b89a90dc7fecacec41243a9cad4e8486 /src/include/access/gist_private.h | |
| parent | 40cd26b0f8b6a1074f8651afe8f00249922b5770 (diff) | |
Fix possible duplicate tuples while GiST scan. Now page is processed
at once and ItemPointers are collected in memory.
Remove tuple's killing by killtuple() if tuple was moved to another
page - it could produce unaceptable overhead.
Backpatch up to 8.1 because the bug was introduced by GiST's concurrency support.
Diffstat (limited to 'src/include/access/gist_private.h')
| -rw-r--r-- | src/include/access/gist_private.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index 463a190aee..5c48db871e 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -58,6 +58,12 @@ typedef struct GISTSTATE TupleDesc tupdesc; } GISTSTATE; +typedef struct ItemResult +{ + ItemPointerData iptr; + bool recheck; +} ItemResult; + /* * When we're doing a scan, we need to keep track of the parent stack * for the marked and current items. @@ -73,6 +79,13 @@ typedef struct GISTScanOpaqueData ItemPointerData curpos; Buffer markbuf; ItemPointerData markpos; + + ItemResult pageData[BLCKSZ/sizeof(IndexTupleData)]; + OffsetNumber nPageData; + OffsetNumber curPageData; + ItemResult markPageData[BLCKSZ/sizeof(IndexTupleData)]; + OffsetNumber markNPageData; + OffsetNumber markCurPageData; } GISTScanOpaqueData; typedef GISTScanOpaqueData *GISTScanOpaque; |
