Thread: pgsql: Prevent synchronous scan during GIN index build, because GIN is

pgsql: Prevent synchronous scan during GIN index build, because GIN is

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
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.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/access/gin:
        gininsert.c (r1.11 -> r1.11.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/gininsert.c?r1=1.11&r2=1.11.2.1)
    pgsql/src/backend/access/gist:
        gist.c (r1.149 -> r1.149.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gist.c?r1=1.149&r2=1.149.2.1)
    pgsql/src/backend/access/hash:
        hash.c (r1.98 -> r1.98.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hash.c?r1=1.98&r2=1.98.2.1)
    pgsql/src/backend/access/nbtree:
        nbtree.c (r1.156.2.1 -> r1.156.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtree.c?r1=1.156.2.1&r2=1.156.2.2)
    pgsql/src/backend/catalog:
        index.c (r1.292.2.1 -> r1.292.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/index.c?r1=1.292.2.1&r2=1.292.2.2)
    pgsql/src/include/catalog:
        index.h (r1.75 -> r1.75.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/index.h?r1=1.75&r2=1.75.2.1)