Prevent synchronous scan during GIN index build, because GIN is optimized
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Nov 2008 17:42:19 +0000 (17:42 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Nov 2008 17:42:19 +0000 (17:42 +0000)
commit77a13dac452895d63a864cf3c5df63a9b1892ad6
tree5c7a0c35ddd2837a7bca3073c9f6d19826e2f5ba
parente1f13020bf3f23bcedc6243bdfe482a3d0a552a9
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.
src/backend/access/gin/gininsert.c
src/backend/access/gist/gist.c
src/backend/access/hash/hash.c
src/backend/access/nbtree/nbtree.c
src/backend/catalog/index.c
src/include/catalog/index.h