Re: should INSERT SELECT use a BulkInsertState?

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: houzj(dot)fnst(at)fujitsu(dot)com
Cc: Luc Vlaming <luc(at)swarm64(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>
Subject: Re: should INSERT SELECT use a BulkInsertState?
Date: 2021-02-22 03:01:58
Message-ID: 20210222030158.GS14772@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 22, 2021 at 02:25:22AM +0000, houzj(dot)fnst(at)fujitsu(dot)com wrote:
> > > Yes, you can see that I've copied the checks from copy.
> > > Like copy, some checks are done once, in ExecInitModifyTable, outside
> > > of the ExecModifyTable "loop".
> > >
> > > This squishes some commits together.
> > > And uses bistate for ON CONFLICT.
> > > And attempts to use memory context for tuple size.
> >
> > Rebased on 9dc718bdf2b1a574481a45624d42b674332e2903
> >
> > I guess my patch should/may be subsumed by this other one - I'm fine with
> > that.
> > https://commitfest.postgresql.org/31/2871/
> >
> > Note that my interest here is just in bistate, to avoid leaving behind many dirty
> > buffers, not improved performance of COPY.
>
> I am very interested in this patch, and I plan to do some experiments with the patch.
> Can you please rebase the patch because it seems can not applied to the master now.

Thanks for your interest.

I was sitting on a rebased version since the bulk FDW patch will cause
conflicts, and since this should maybe be built on top of the table-am patch
(2871). Have fun :)

--
Justin

Attachment Content-Type Size
v10-0001-INSERT-SELECT-to-use-BulkInsertState-and-multi_i.patch text/x-diff 46.8 KB
v10-0002-WIP-Check-for-volatile-defaults.patch text/x-diff 7.3 KB
v10-0003-COPY-flush-multi-insert-buffer-based-on-accumula.patch text/x-diff 1.7 KB
v10-0004-WIP-check-tuple-size.patch text/x-diff 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-02-22 03:11:43 Re: Parallel INSERT (INTO ... SELECT ...)
Previous Message Amit Kapila 2021-02-22 02:52:35 Re: repeated decoding of prepared transactions