From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: In COPY, insert tuples to the heap in batches. |
Date: | 2011-11-09 09:06:59 |
Message-ID: | E1RO47X-0001EJ-6D@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/d326d9e8ea1d690cf6d968000efaa5121206d231
Modified Files
--------------
src/backend/access/heap/heapam.c | 484 ++++++++++++++++++++++++++++++++++----
src/backend/commands/copy.c | 166 ++++++++++++-
src/backend/postmaster/pgstat.c | 6 +-
src/include/access/heapam.h | 2 +
src/include/access/htup.h | 31 +++
src/include/pgstat.h | 2 +-
6 files changed, 629 insertions(+), 62 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-11-09 13:25:46 | Re: [COMMITTERS] pgsql: In COPY, insert tuples to the heap in batches. |
Previous Message | Tom Lane | 2011-11-09 05:14:00 | pgsql: Tweak new regression test case for more portability. |
From | Date | Subject | |
---|---|---|---|
Next Message | Nikhil Sontakke | 2011-11-09 09:56:31 | Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers |
Previous Message | Thom Brown | 2011-11-09 08:38:52 | Re: pg_comments (was: Allow \dd to show constraint comments) |