pgsql: Prevent synchronous scan during GIN index build, because GIN is - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Prevent synchronous scan during GIN index build, because GIN is
Date
Msg-id 20081113174210.4F2EC7545A4@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Modified Files:
--------------
    pgsql/src/backend/access/gin:
        gininsert.c (r1.15 -> r1.16)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/gininsert.c?r1=1.15&r2=1.16)
    pgsql/src/backend/access/gist:
        gist.c (r1.153 -> r1.154)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gist.c?r1=1.153&r2=1.154)
    pgsql/src/backend/access/hash:
        hash.c (r1.106 -> r1.107)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hash.c?r1=1.106&r2=1.107)
    pgsql/src/backend/access/nbtree:
        nbtree.c (r1.164 -> r1.165)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtree.c?r1=1.164&r2=1.165)
    pgsql/src/backend/catalog:
        index.c (r1.307 -> r1.308)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/index.c?r1=1.307&r2=1.308)
    pgsql/src/include/catalog:
        index.h (r1.75 -> r1.76)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/index.h?r1=1.75&r2=1.76)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: PGDLLIMPORT-ize the global variables referenced in pg_crc.h.
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Prevent synchronous scan during GIN index build, because GIN is