aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/gist_private.h
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2008-08-23 10:40:03 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2008-08-23 10:40:03 +0000
commit0ab43c96781f37a72ae4e1e897d1e10f56c484d2 (patch)
treee03337ef4a768b60e2af2ba97f1bdc464a259116 /src/include/access/gist_private.h
parent3fcb7f0bd46b279da20ac3a9ffffda898c4cf573 (diff)
downloadpostgresql-0ab43c96781f37a72ae4e1e897d1e10f56c484d2.tar.gz
postgresql-0ab43c96781f37a72ae4e1e897d1e10f56c484d2.zip
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 e6ca50a702f..e823928c3e2 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 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.28.2.1 2008/08/23 10:40:03 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -75,6 +75,13 @@ typedef struct GISTScanOpaqueData
ItemPointerData curpos;
Buffer markbuf;
ItemPointerData markpos;
+
+ ItemPointerData pageData[BLCKSZ/sizeof(IndexTupleData)];
+ OffsetNumber nPageData;
+ OffsetNumber curPageData;
+ ItemPointerData markPageData[BLCKSZ/sizeof(IndexTupleData)];
+ OffsetNumber markNPageData;
+ OffsetNumber markCurPageData;
} GISTScanOpaqueData;
typedef GISTScanOpaqueData *GISTScanOpaque;