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

From: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
To: 'Zhihong Yu' <zyu(at)yugabyte(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>, Michael Paquier <michael(at)paquier(dot)xyz>, Ashutosh Bapat <ashutosh(dot)bapat(at)2ndquadrant(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>, PostgreSQL-Dev <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
Subject: RE: [POC] Fast COPY FROM command for the table with foreign partitions
Date: 2021-03-04 07:39:55
Message-ID: TYAPR01MB299090411AC25A6B56103869FE979@TYAPR01MB2990.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Zhihong Yu <zyu(at)yugabyte(dot)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

Attachment Content-Type Size
v18-0001-Fast-COPY-FROM-into-the-foreign-or-sharded-table.patch application/octet-stream 49.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Lepikhov 2021-03-04 07:43:56 Re: Increase value of OUTER_VAR
Previous Message Bharath Rupireddy 2021-03-04 07:34:47 Re: Identify missing publications from publisher while create/alter subscription.