summaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginfast.c
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2010-02-11 14:29:50 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2010-02-11 14:29:50 +0000
commit5209c084a646018bf429e4a1800e76e7b8b548a7 (patch)
treec065623638186055ecac27ec34bf61842b9f66bd /src/backend/access/gin/ginfast.c
parent161d9d51b321f021d4231001ccc32988edfccda0 (diff)
downloadpostgresql-5209c084a646018bf429e4a1800e76e7b8b548a7.tar.gz
Generic implementation of red-black binary tree. It's planned to use in
several places, but for now only GIN uses it during index creation. Using self-balanced tree greatly speeds up index creation in corner cases with preordered data.
Diffstat (limited to 'src/backend/access/gin/ginfast.c')
-rw-r--r--src/backend/access/gin/ginfast.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
index fb22bd035e..f8e0b5ad40 100644
--- a/src/backend/access/gin/ginfast.c
+++ b/src/backend/access/gin/ginfast.c
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gin/ginfast.c,v 1.6 2010/01/02 16:57:33 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gin/ginfast.c,v 1.7 2010/02/11 14:29:50 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -765,8 +765,7 @@ ginInsertCleanup(Relation index, GinState *ginstate,
*/
if (GinPageGetOpaque(page)->rightlink == InvalidBlockNumber ||
(GinPageHasFullRow(page) &&
- (accum.allocatedMemory >= maintenance_work_mem * 1024L ||
- accum.maxdepth > GIN_MAX_TREE_DEPTH)))
+ (accum.allocatedMemory >= maintenance_work_mem * 1024L)))
{
ItemPointerData *list;
uint32 nlist;