RE: POC: postgres_fdw insert batching

Поиск
Список
Период
Сортировка
От tsunakawa.takay@fujitsu.com
Тема RE: POC: postgres_fdw insert batching
Дата
Msg-id TYAPR01MB299064F2876A0B9FC0EFDCD8FEF50@TYAPR01MB2990.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: POC: postgres_fdw insert batching  (David Fetter <david@fetter.org>)
Список pgsql-hackers
From: David Fetter <david@fetter.org>
> Please pardon me for barging in late in this discussion, but if we're
> going to be using a bulk API here, wouldn't it make more sense to use
> COPY, except where RETURNING is specified, in place of INSERT?

Please do not hesitate.  I mentioned earlier in this thread that I think INSERT is better because:


--------------------------------------------------
* When the user executed INSERT statements, it would look strange to the user if the remote SQL is displayed as COPY.

* COPY doesn't invoke rules unlike INSERT.  (I don't think the rule is a feature what users care about, though.)  Also,
I'ma bit concerned that there might be, or will be, other differences between INSERT and COPY. 
--------------------------------------------------


Also, COPY to foreign tables currently uses INSERTs, the improvement of using COPY instead of INSERT is in progress
[1]. Keeping "COPY uses COPY, INSERT uses INSERT" correspondence seems natural, and it makes COPY's high-speed
advantagestand out. 


[1]
Fast COPY FROM command for the table with foreign partitions
https://www.postgresql.org/message-id/flat/3d0909dc-3691-a576-208a-90986e55489f%40postgrespro.ru


Regards
Takayuki Tsunakawa




В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hou, Zhijie"
Дата:
Сообщение: support IncrementalSortPath type in outNode()
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [PATCH] Keeps tracking the uniqueness with UniqueKey