Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?
Date: 2019-06-11 13:20:42
Message-ID: CBA1609E-21F4-452B-AEA9-2C2643D075F4@yesql.se
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

> On 23 May 2019, at 03:46, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2019-05-22 10:25:14 +0200, Daniel Gustafsson wrote:

>> When a colleague was looking at heap_multi_insert in the COPY codepath I
>> remembered this and took a stab at a WIP patch inspired by this email, while
>> not following it to the letter. It’s not going the full route of collecting
>> all the dependencies for creating a table, but adding ways to perform
>> multi_heap_insert in the existing codepaths as it seemed like a good place to
>> start.
>
> Cool. I don't quite have the energy to look at this right now, could you
> create a CF entry for this?

Attached is an updated version with some of the stuff we briefly discussed at
PGCon. This version use the ObjectAddresses API already established to collect
the dependencies, and perform a few more multi inserts. Profiling shows that
we are spending less time in catalog insertions, but whether it’s enough to
warrant the added complexity is up for debate.

The patch is still rough around the edges (TODO’s left to mark some areas), but
I prefer to get some feedback early rather than working too far in potentially
the wrong direction, so parking this in the CF for now.

cheers ./daniel

Attachment Content-Type Size
catalog_multi_insert-v2.patch application/octet-stream 44.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2019-06-11 13:23:57 Re: tableam: abstracting relation sizing code
Previous Message Robert Haas 2019-06-11 13:17:25 Re: tableam: abstracting relation sizing code