-
- Downloads
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.
Showing
- src/backend/access/nbtree/nbtpage.c 32 additions, 89 deletionssrc/backend/access/nbtree/nbtpage.c
- src/backend/access/nbtree/nbtree.c 6 additions, 5 deletionssrc/backend/access/nbtree/nbtree.c
- src/backend/access/nbtree/nbtsort.c 182 additions, 78 deletionssrc/backend/access/nbtree/nbtsort.c
- src/backend/access/nbtree/nbtxlog.c 10 additions, 32 deletionssrc/backend/access/nbtree/nbtxlog.c
- src/backend/storage/smgr/md.c 35 additions, 1 deletionsrc/backend/storage/smgr/md.c
- src/backend/storage/smgr/smgr.c 32 additions, 2 deletionssrc/backend/storage/smgr/smgr.c
- src/include/access/nbtree.h 4 additions, 6 deletionssrc/include/access/nbtree.h
- src/include/storage/smgr.h 3 additions, 1 deletionsrc/include/storage/smgr.h
Loading
Please register or sign in to comment