Skip site navigation (1) Skip section navigation (2)

pgsql-server: Adjust btree index build to not use shared buffers,

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: Adjust btree index build to not use shared buffers,
Date: 2004-06-02 17:28:19
Message-ID: 20040602172819.5923CD1B349@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Adjust btree index build to not use shared buffers, thereby avoiding the
locking conflict against concurrent CHECKPOINT that was discussed a few
weeks ago.  Also, if not using WAL archiving (which is always true ATM
but won't be if PITR makes it into this release), there's no need to
WAL-log the index build process; it's sufficient to force-fsync the
completed index before commit.  This seems to gain about a factor of 2
in my tests, which is consistent with writing half as much data.  I did
not try it with WAL on a separate drive though --- probably the gain would
be a lot less in that scenario.

Modified Files:
--------------
    pgsql-server/src/backend/access/nbtree:
        nbtpage.c (r1.75 -> r1.76)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/nbtree/nbtpage.c.diff?r1=1.75&r2=1.76)
        nbtree.c (r1.116 -> r1.117)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/nbtree/nbtree.c.diff?r1=1.116&r2=1.117)
        nbtsort.c (r1.81 -> r1.82)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/nbtree/nbtsort.c.diff?r1=1.81&r2=1.82)
        nbtxlog.c (r1.12 -> r1.13)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/nbtree/nbtxlog.c.diff?r1=1.12&r2=1.13)
    pgsql-server/src/backend/storage/smgr:
        md.c (r1.106 -> r1.107)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/smgr/md.c.diff?r1=1.106&r2=1.107)
        smgr.c (r1.72 -> r1.73)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/smgr/smgr.c.diff?r1=1.72&r2=1.73)
    pgsql-server/src/include/access:
        nbtree.h (r1.77 -> r1.78)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/access/nbtree.h.diff?r1=1.77&r2=1.78)
    pgsql-server/src/include/storage:
        smgr.h (r1.43 -> r1.44)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/storage/smgr.h.diff?r1=1.43&r2=1.44)

pgsql-committers by date

Next:From: Tom LaneDate: 2004-06-02 18:09:33
Subject: pgsql-server: Fix breakage from GUC-extension-variables patch.
Previous:From: Bruce MomjianDate: 2004-06-01 22:05:26
Subject: Re: pg_ctl-related "fixes"

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group