summaryrefslogtreecommitdiff
path: root/src/include/access/gist_private.h
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2008-08-23 10:41:38 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2008-08-23 10:41:38 +0000
commite41417571307cbf1f019525a3a7d3bf98e7c4603 (patch)
tree8af7e63e2d40d4ed9361980a55c92f65ec085c59 /src/include/access/gist_private.h
parent7ddd8396479a11ff81b0ca506e97617c4cd445d3 (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.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index 0c17fd42117..ee94875a342 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 2006/10/04 00:30:07 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.24.2.1 2008/08/23 10:41:38 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -73,6 +73,13 @@ typedef struct GISTScanOpaqueData
MemoryContext tempCxt;
Buffer curbuf;
Buffer markbuf;
+
+ ItemPointerData pageData[BLCKSZ/sizeof(IndexTupleData)];
+ OffsetNumber nPageData;
+ OffsetNumber curPageData;
+ ItemPointerData markPageData[BLCKSZ/sizeof(IndexTupleData)];
+ OffsetNumber markNPageData;
+ OffsetNumber markCurPageData;
} GISTScanOpaqueData;
typedef GISTScanOpaqueData *GISTScanOpaque;