|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - *$PostgreSQL: pgsql/src/backend/access/gin/gininsert.c,v 1.15 2008/09/30 10:52:10 heikki Exp $ |
| 11 | + *$PostgreSQL: pgsql/src/backend/access/gin/gininsert.c,v 1.16 2008/11/13 17:42:09 tgl Exp $ |
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
14 | 14 |
|
@@ -340,8 +340,11 @@ ginbuild(PG_FUNCTION_ARGS)
|
340 | 340 | buildstate.accum.ginstate=&buildstate.ginstate;
|
341 | 341 | ginInitBA(&buildstate.accum);
|
342 | 342 |
|
343 |
| -/* do the heap scan */ |
344 |
| -reltuples=IndexBuildHeapScan(heap,index,indexInfo, |
| 343 | +/* |
| 344 | + * Do the heap scan. We disallow sync scan here because dataPlaceToPage |
| 345 | + * prefers to receive tuples in TID order. |
| 346 | + */ |
| 347 | +reltuples=IndexBuildHeapScan(heap,index,indexInfo, false, |
345 | 348 | ginBuildCallback, (void*)&buildstate);
|
346 | 349 |
|
347 | 350 | /* dump remaining entries to the index */
|
|