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: Amit Langote <amitlangote09@gmail.com>,
"tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
Cc: 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>
Date: 2020-12-14T09:06:12Z
Lists: pgsql-hackers
Attachments
On 12/1/20 2:02 PM, Amit Langote wrote: > On Tue, Dec 1, 2020 at 2:40 PM tsunakawa.takay@fujitsu.com > <tsunakawa.takay@fujitsu.com> wrote: >> From: Amit Langote <amitlangote09@gmail.com> >> The code appears to require both BeginForeignCopy and EndForeignCopy, >> while the following documentation says they are optional. Which is >> correct? (I suppose the latter is correct just like other existing >> Begin/End functions are optional.) Fixed. > Anyway, one thing we could do is rename > ExecRelationAllowsMultiInsert() to ExecSetRelationUsesMultiInsert( Renamed. >> I agree with your idea of adding multi_insert argument to ExecFindPartition() to request a multi-insert-capable partition. At first, I thought ExecFindPartition() is used for all operations, insert/delete/update/select, so I found it odd to add multi_insert argument. But ExecFindPartion() is used only for insert, so multi_insert argument seems okay. > > Good. Andrey, any thoughts on this? I have no serious technical arguments against this, other than code readability and reduce of a routine parameters. Maybe we will be rethinking it later? The new version rebased on commit 525e60b742 is attached. -- regards, Andrey Lepikhov Postgres Professional
Commits
-
Allow batch insertion during COPY into a foreign table.
- 97da48246d34 16.0 landed
-
postgres_fdw: Disable batch insertion when there are WCO constraints.
- 82593b9a3d5f 16.0 cited
-
Enforce foreign key correctly during cross-partition updates
- ba9a7e392171 15.0 cited
-
Fix permission checks on constraint violation errors on partitions.
- 6214e2b22804 14.0 cited
-
Fix compilation of uuid-ossp
- 525e60b74299 14.0 cited