Re: Inserting heap tuples in bulk in COPY

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inserting heap tuples in bulk in COPY
Date: 2011-11-25 20:53:19
Message-ID: CAMkU=1ywb3RHfkyB7zbNrX1WDpx5D4tT=kXjLqNpFajLBsgmZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 24, 2011 at 7:46 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>
> Thanks! Here's an updated version of the patch, fixing that, and all the
> other issues pointed out this far.
>
> I extracted the code that sets oid and tuple headers, and invokes the
> toaster, into a new function that's shared by heap_insert() and
> heap_multi_insert(). Tom objected to merging heap_insert() and
> heap_multi_insert() into one complicated function, and I think he was right
> on that, but sharing this code to prepare a tuple still makes sense. IMHO it
> makes heap_insert() slightly more readable too.

Hi Heikki,

Thanks for this patch. Doing bulk copies in parallel for me is now
limited by the IO subsystem rather than the CPU.

This patch, commit number d326d9e8ea1d69, causes fillfactor to be
ignored for the copy command. Is this acceptable collateral damage?

This can be seen by using "pgbench -i -s50 -F50" to create the table
combined with and select
pg_size_pretty(pg_table_size('pgbench_accounts')), or by using the
relation_free_space extension to pageinspect proposed elsewhere.

Thanks,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-11-25 21:01:20 Re: xpath_table
Previous Message Bruce Momjian 2011-11-25 20:41:36 Re: pg_dump vs malloc