Re: [POC] Fast COPY FROM command for the table with foreign partitions

Ibrar Ahmed <ibrar.ahmad@gmail.com>

From: Ibrar Ahmed <ibrar.ahmad@gmail.com>
To: "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
Cc: Zhihong Yu <zyu@yugabyte.com>, Justin Pryzby <pryzby@telsasoft.com>, Amit Langote <amitlangote09@gmail.com>, Andrey Lepikhov <a.lepikhov@postgrespro.ru>, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, Alexey Kondratov <a.kondratov@postgrespro.ru>, Michael Paquier <michael@paquier.xyz>, Ashutosh Bapat <ashutosh.bapat@2ndquadrant.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, Etsuro Fujita <etsuro.fujita@gmail.com>, PostgreSQL-Dev <pgsql-hackers@postgresql.org>, Tomas Vondra <tomas.vondra@enterprisedb.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
Date: 2021-03-04T11:02:26Z
Lists: pgsql-hackers
On Thu, Mar 4, 2021 at 12:40 PM tsunakawa.takay@fujitsu.com <
tsunakawa.takay@fujitsu.com> wrote:

> From: Zhihong Yu <zyu@yugabyte.com>
> > This feature enables bulk COPY into foreign table in the case of
> > multi inserts is possible
> >
> > 'is possible' -> 'if possible'
> >
> > FDWAPI was extended by next routines:
> >
> > next routines -> the following routines
>
> Thank you, fixed slightly differently.  (I feel the need for pgEnglish
> again.)
>
>
> > +       if ((!OK && PQresultStatus(res) != PGRES_FATAL_ERROR) ||
> >
> > Is PGRES_FATAL_ERROR handled somewhere else ? I don't seem to find that
> in the patch.
>
> Good catch.  ok doesn't need to be consulted here, because failure during
> row transmission causes PQputCopyEnd() to receive non-NULL for its second
> argument, which in turn makes PQgetResult() return non-COMMAND_OK.
>
>
> Regards
> Takayuki Tsunakawa
>
>
This patch set no longer applies
http://cfbot.cputube.org/patch_32_2601.log

Can we get a rebase?

I am marking the patch "Waiting on Author"

-- 
Ibrar Ahmed

Commits

  1. Allow batch insertion during COPY into a foreign table.

  2. postgres_fdw: Disable batch insertion when there are WCO constraints.

  3. Enforce foreign key correctly during cross-partition updates

  4. Fix permission checks on constraint violation errors on partitions.

  5. Fix compilation of uuid-ossp