Re: Allow batched insert during cross-partition updates

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Zhihong Yu <zyu(at)yugabyte(dot)com>, gkokolatos(at)pm(dot)me, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)fujitsu(dot)com>
Subject: Re: Allow batched insert during cross-partition updates
Date: 2021-04-06 13:07:41
Message-ID: CA+HiwqF-JE_JksvSVz6wQcWENzNqfoi29iUNvwqR+t6OeHOWsw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 6, 2021 at 6:49 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> On Tue, Apr 6, 2021 at 3:08 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> > Updated patch attached. I had to adjust the test case a little bit to
> > account for the changes of 86dc90056d, something I failed to notice
> > yesterday. Also, I expanded the test case added in postgres_fdw.sql a
> > bit to show the batching in action more explicitly.
>
> Some minor comments:

Thanks for the review.

> 1) don't we need order by clause for the selects in the tests added?
> +SELECT tableoid::regclass, * FROM batch_cp_upd_test;

Good point. It wasn't necessary before, but it is after the test
expansion, so added.

> 3) will the cmin in the output always be the same?
> +SELECT cmin, * FROM batch_cp_upd_test3;

TBH, I am not so sure. Maybe it's not a good idea to rely on cmin
after all. I've rewritten the tests to use a different method of
determining if a single or multiple insert commands were used in
moving rows into foreign partitions.

--
Amit Langote
EDB: http://www.enterprisedb.com

Attachment Content-Type Size
v5-0001-Allow-batching-of-inserts-during-cross-partition-.patch application/octet-stream 18.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message YoungHwan Joo 2021-04-06 13:22:20 Re: [GSoC 2021 Proposal] Develop Performance Farm Benchmarks and Website
Previous Message Michael Paquier 2021-04-06 13:02:22 Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)