Re: [COMMITTERS] pgsql: In COPY, insert tuples to the heap in batches.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: In COPY, insert tuples to the heap in batches.
Date: 2011-11-09 18:42:53
Message-ID: 4EBAC9AD.40603@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 09.11.2011 15:25, Simon Riggs wrote:
> On Wed, Nov 9, 2011 at 9:06 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)iki(dot)fi> wrote:
>> 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.
>
> Sounds good.
>
> I can't see where this applies backup blocks. If it does, can you
> document why/where/how it differs from other WAL records?

Good catch, I missed that. I copied the redo function from normal
insertion, but missed that heap_redo() takes care of backup blocks for
you, while heap2_redo() does not.

I'll go fix that..

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2011-11-09 18:58:29 pgsql: Clean gettext-files file in clean target
Previous Message Robert Haas 2011-11-09 16:15:02 pgsql: Fix compiler warning.

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2011-11-09 19:14:58 Adding Node support in outfuncs.c and readfuncs.c
Previous Message Greg Smith 2011-11-09 18:38:35 Re: 9.1.2 ?