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

tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>

From: "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
To: "'Andrey V. Lepikhov'" <a.lepikhov@postgrespro.ru>
Cc: "tanghy.fnst@cn.fujitsu.com" <tanghy.fnst@cn.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@cn.fujitsu.com" <houzj.fnst@cn.fujitsu.com>, Amit Langote <amitlangote09@gmail.com>
Date: 2021-02-09T08:30:37Z
Lists: pgsql-hackers
From: Andrey V. Lepikhov <a.lepikhov@postgrespro.ru>
> I tried to use 1E4 - 1E8 rows in a tuple buffer. But the results weren't
> impressive.

I guess that's because the 64 KB threshold came first.


> We can use one more GUC instead of a precompiled constant.

Yes, agreed.


> > Why don't we focus on committing the basic part and addressing the
> extended part (0003 and 0004) separately later?
> I focused only on the 0001 and 0002 patches.
> >  As Tang-san and you showed, the basic part already demonstrated
> impressive improvement.  If there's no objection, I'd like to make this ready for
> committer in a few days.
> Good.

Glad to hear that.


Regards
Takayuki Tsunakawa


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