aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/gist_private.h
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2008-08-23 10:43:58 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2008-08-23 10:43:58 +0000
commit4040629fe13c18630768fc3c5ff84b3ff3a32fdf (patch)
tree48b3fc202e92dcd0b07dd480ee9b0b736d00dd3f /src/include/access/gist_private.h
parent7e9308544f041cf59e0dd4916fe93fee9aa91f99 (diff)
downloadpostgresql-4040629fe13c18630768fc3c5ff84b3ff3a32fdf.tar.gz
postgresql-4040629fe13c18630768fc3c5ff84b3ff3a32fdf.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 1cfa5b92bc2..c1861180d24 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.8 2005/10/15 02:49:42 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.8.2.1 2008/08/23 10:43:58 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;