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

Andrei Lepikhov <a.lepikhov@postgrespro.ru>

From: "Andrey V. Lepikhov" <a.lepikhov@postgrespro.ru>
To: Michael Paquier <michael@paquier.xyz>, Amit Langote <amitlangote09@gmail.com>
Cc: 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>
Date: 2020-09-07T10:31:09Z
Lists: pgsql-hackers

Attachments

On 9/7/20 12:26 PM, Michael Paquier wrote:
> On Mon, Aug 24, 2020 at 06:19:28PM +0900, Amit Langote wrote:
>> On Mon, Aug 24, 2020 at 4:18 PM Amit Langote <amitlangote09@gmail.com> wrote:
>>> I would
>>
>> Oops, thought I'd continue writing, but hit send before actually doing
>> that.  Please ignore.
>>
>> I have some comments on v6, which I will share later this week.
> 
> While on it, the CF bot is telling that the documentation of the patch
> fails to compile.  This needs to be fixed.
> --
> Michael
> 
v.7 (in attachment) fixes this problem.
I also accepted Amit's suggestion to rename all fdwapi routines such as 
ForeignCopyIn to *ForeignCopy.

-- 
regards,
Andrey Lepikhov
Postgres Professional

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