]> granicus.if.org Git - postgresql/commit
In COPY, insert tuples to the heap in batches.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 9 Nov 2011 08:54:41 +0000 (10:54 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 9 Nov 2011 08:54:41 +0000 (10:54 +0200)
commitd326d9e8ea1d690cf6d968000efaa5121206d231
tree861237f4028e9c8f1d1aba2045a97195867cb5b8
parent2c30f96103c320d4e3c8cab2807d88476f584278
In COPY, insert tuples to the heap in batches.

This greatly reduces the WAL volume, especially when the table is narrow.
The overhead of locking the heap page is also reduced. Reduced WAL traffic
also makes it scale a lot better, if you run multiple COPY processes at
the same time.
src/backend/access/heap/heapam.c
src/backend/commands/copy.c
src/backend/postmaster/pgstat.c
src/include/access/heapam.h
src/include/access/htup.h
src/include/pgstat.h