Re: Allow batched insert during cross-partition updates

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: 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-04 16:19:27
Message-ID: CALNJ-vS8x5OfZvgGR-9A43qfauQoDPfDht_0H-iUa-i9JAzkDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
In the description:

cross-partition update of partitioned tables can't use batching
because ExecInitRoutingInfo() which initializes the insert target

'which' should be dropped since 'because' should start a sentence.

+-- Check that batched inserts also works for inserts made during

inserts also works -> inserts also work

+ Assert(node->rootResultRelInfo->ri_RelationDesc->rd_rel->relkind ==
+ RELKIND_PARTITIONED_TABLE);

The level of nested field accesses is quite deep. If the assertion fails,
it would be hard to know which field is null.
Maybe use several assertions:
Assert(node->rootResultRelInfo)
Assert(node->rootResultRelInfo->ri_RelationDesc)
Assert(node->rootResultRelInfo->ri_RelationDesc->rd_rel->relkind ==
...

Cheers

On Sun, Apr 4, 2021 at 8:06 AM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:

> On Tue, Mar 16, 2021 at 6:13 PM <gkokolatos(at)pm(dot)me> wrote:
> > Status updated to RfC in the commitfest app.
>
> Patch fails to apply per cfbot, so rebased.
>
> --
> Amit Langote
> EDB: http://www.enterprisedb.com
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-04-04 16:20:38 Re: possible repalloc() in icu_convert_case()
Previous Message Tom Lane 2021-04-04 16:07:10 Re: Unused variable found in AttrDefaultFetch