Re: postgres_fdw: batch inserts vs. before row triggers

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: postgres_fdw: batch inserts vs. before row triggers
Date: 2022-04-21 06:49:45
Message-ID: CAPmGK14iHt3u4YkCGYKuPRJz80cmSmeakjskS36rZ7ZypgcNxA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Apr 19, 2022 at 9:00 PM Tomas Vondra
<tomas(dot)vondra(at)enterprisedb(dot)com> wrote:
> On 4/19/22 11:16, Etsuro Fujita wrote:
> > On Sun, Apr 17, 2022 at 6:20 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> >> So I think we should disable batch insert in such cases, just as we
> >> disable multi insert when there are any before row triggers on the
> >> target (local) tables/partitions in copyfrom.c. Attached is a patch
> >> for that.
> >
> > If there are no objections from Tomas or anyone else, I'll commit the patch.

> +1, I think it's a bug to do batch insert in this case.

Pushed and back-patched to v14, after tweaking a comment a little bit.

Thanks!

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2022-04-21 07:09:20 Re: A qsort template
Previous Message bucoo@sohu.com 2022-04-21 06:38:22 Re: Re: fix cost subqueryscan wrong parallel cost