diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-13 17:42:10 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-13 17:42:10 +0000 |
commit | 10e3acb8e7bd3298ba2b942f86c18f5ba2e142a8 (patch) | |
tree | 19bf64481b48aa0f21669a994958fb7c4be2645f /src/backend/access/nbtree/nbtree.c | |
parent | 3379fae6de5994b242cedfa48cf613ecfee3db24 (diff) | |
download | postgresql-10e3acb8e7bd3298ba2b942f86c18f5ba2e142a8.tar.gz postgresql-10e3acb8e7bd3298ba2b942f86c18f5ba2e142a8.zip |
Prevent synchronous scan during GIN index build, because GIN is optimized
for inserting tuples in increasing TID order. It's not clear whether this
fully explains Ivan Sergio Borgonovo's complaint, but simple testing
confirms that a scan that doesn't start at block 0 can slow GIN build by
a factor of three or four.
Backpatch to 8.3. Sync scan didn't exist before that.
Diffstat (limited to 'src/backend/access/nbtree/nbtree.c')
-rw-r--r-- | src/backend/access/nbtree/nbtree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c index f47a8e5f364..bd486afabb7 100644 --- a/src/backend/access/nbtree/nbtree.c +++ b/src/backend/access/nbtree/nbtree.c @@ -12,7 +12,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.164 2008/10/31 15:04:59 heikki Exp $ + * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.165 2008/11/13 17:42:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -122,7 +122,7 @@ btbuild(PG_FUNCTION_ARGS) buildstate.spool2 = _bt_spoolinit(index, false, true); /* do the heap scan */ - reltuples = IndexBuildHeapScan(heap, index, indexInfo, + reltuples = IndexBuildHeapScan(heap, index, indexInfo, true, btbuildCallback, (void *) &buildstate); /* okay, all heap tuples are indexed */ |