]> granicus.if.org Git - postgresql/commit
Prevent synchronous scan during GIN index build, because GIN is optimized
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Nov 2008 17:42:10 +0000 (17:42 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Nov 2008 17:42:10 +0000 (17:42 +0000)
commit10e3acb8e7bd3298ba2b942f86c18f5ba2e142a8
tree19bf64481b48aa0f21669a994958fb7c4be2645f
parent3379fae6de5994b242cedfa48cf613ecfee3db24
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