aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/gin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/access/gin.h')
-rw-r--r--src/include/access/gin.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/include/access/gin.h b/src/include/access/gin.h
index f0f45bc5e8a..c591c53638c 100644
--- a/src/include/access/gin.h
+++ b/src/include/access/gin.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2006-2009, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.29 2009/03/24 20:17:14 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.30 2009/03/24 22:06:03 tgl Exp $
*--------------------------------------------------------------------------
*/
#ifndef GIN_H
@@ -27,6 +27,14 @@
#define GINNProcs 5
/*
+ * Max depth allowed in search tree during bulk inserts. This is to keep from
+ * degenerating to O(N^2) behavior when the tree is unbalanced due to sorted
+ * or nearly-sorted input. (Perhaps it would be better to use a balanced-tree
+ * algorithm, but in common cases that would only add useless overhead.)
+ */
+#define GIN_MAX_TREE_DEPTH 100
+
+/*
* Page opaque data in a inverted index page.
*
* Note: GIN does not include a page ID word as do the other index types.
@@ -434,12 +442,9 @@ extern IndexTuple ginPageGetLinkItup(Buffer buf);
/* gindatapage.c */
extern int compareItemPointers(ItemPointer a, ItemPointer b);
-extern void
-MergeItemPointers(
- ItemPointerData *dst,
+extern void MergeItemPointers(ItemPointerData *dst,
ItemPointerData *a, uint32 na,
- ItemPointerData *b, uint32 nb
-);
+ ItemPointerData *b, uint32 nb);
extern void GinDataPageAddItem(Page page, void *data, OffsetNumber offset);
extern void PageDeletePostingItem(Page page, OffsetNumber offset);