From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
Cc: | Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Inserting heap tuples in bulk in COPY |
Date: | 2011-10-24 14:46:21 |
Message-ID: | 4EA57A3D.5050509@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 25.09.2011 16:03, Dean Rasheed wrote:
> On 25 September 2011 09:43, Kohei KaiGai<kaigai(at)kaigai(dot)gr(dot)jp> wrote:
>> Hi Heikki,
>>
>> I checked your patch, then I have a comment and two questions here.
>>
>> 2011/9/14 Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com>:
>>>
>>> Attached is a new version of the patch. It is now complete, including WAL
>>> replay code.
>
> Hi,
>
> I had a quick look at the patch as well and spotted an oversight: the
> multi-insert code branch fails to invoke AFTER ROW triggers.
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.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
copy-heap-multi-insert-3.patch | text/x-diff | 31.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-10-24 14:51:07 | Re: So, is COUNT(*) fast now? |
Previous Message | Tom Lane | 2011-10-24 14:36:55 | Re: autovacuum and orphaned large objects |