Re: [POC] Fast COPY FROM command for the table with foreign partitions - Mailing list pgsql-hackers

From Andrey V. Lepikhov
Subject Re: [POC] Fast COPY FROM command for the table with foreign partitions
Date
Msg-id 9bff5ccc-8649-9699-1cdd-82b53164f9bb@postgrespro.ru
Whole thread Raw
In response to Re: [POC] Fast COPY FROM command for the table with foreign partitions  (Amit Langote <amitlangote09@gmail.com>)
Responses RE: [POC] Fast COPY FROM command for the table with foreign partitions
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Some error messages are omitted while recovery.
Next
From: Ashutosh Bapat
Date:
Subject: Misleading comment in prologue of ReorderBufferQueueMessage