From: Andrey Lepikhov <a.lepik...@postgrespro.ru>
> We still have slow 'COPY FROM' operation for foreign tables in current master.
> Now we have a foreign batch insert operation And I tried to rewrite the patch 
> [1]
> with this machinery.

I haven't looked at the patch, but nice performance.

However, I see the following problems.  What do you think about them?

1)
No wonder why the user would think like "Why are INSERTs run on the remote 
server?  I ran COPY."


2)
Without the FDW API for COPY, other FDWs won't get a chance to optimize for 
bulk data loading.  For example, oracle_fdw might use conventional path insert 
for the FDW batch insert, and the direct path insert for the FDW COPY.


3)
INSERT and COPY in Postgres differs in whether the rule is invoked:

https://www.postgresql.org/docs/devel/sql-copy.html

"COPY FROM will invoke any triggers and check constraints on the destination 
table. However, it will not invoke rules."


Regards
Takayuki Tsunakawa

Reply via email to