Re: postgres_fdw: batch inserts vs. before row triggers

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: postgres_fdw: batch inserts vs. before row triggers
Date: 2022-12-02 07:54:34
Message-ID: CAPmGK17rmXEY3BL=Aq71L8UZv5f-mz=uxJkz1kMnfSSY+pFe-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 27, 2022 at 12:11 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> writes:
> > On Sat, Nov 26, 2022 at 1:57 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Couldn't we add the field to ModifyTableState, instead?
>
> > We could probably do so, but I thought having a global list would be
> > more efficient to handle pending buffered inserts than that.
>
> OK, as long as there's a reason for doing it that way, it's OK
> by me. I don't think that adding a field at the end of EState
> is an ABI problem.
>
> We have to do something else than add to ResultRelInfo, though.

OK, I removed from ResultRelInfo a field that I added in the commit to
save the owning ModifyTableState if insert-pending, and added to
EState another List member to save such ModifyTableStates, instead. I
am planning to apply this to not only back branches but HEAD, to make
back-patching easy, if there are no objections.

Best regards,
Etsuro Fujita

Attachment Content-Type Size
Avoid-ABI-break.patch application/octet-stream 5.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2022-12-02 08:34:11 Re: pg_dump: Remove "blob" terminology
Previous Message Himanshu Upadhyaya 2022-12-02 07:50:54 Re: HOT chain validation in verify_heapam()