Is it necessary to keep am routine finish_bulk_insert?

Поиск
Список
Период
Сортировка
От Zhang Mingli
Тема Is it necessary to keep am routine finish_bulk_insert?
Дата
Msg-id 2253fa56-3e1b-47ab-879c-1eb2af6f41f3@Spark
обсуждение исходный текст
Список pgsql-hackers
Hi, 

We got some trouble when using bulk_insert  of COPY FROM around CopyMultiInsertInfoFlush(), the target table is our own access method storage.

The reason is we mistakenly set am routine finish_bulk_insert() to clean some resources or context. We thought it’s used as normal insert_finish and etc,
but COPY will call that multiple times if copy buffer is full.

And I check this am routine of heap am, found that heapam_finish_bulk_insert() has been removed at commit c6b9204.

Current in codes, there is no place to call finish_bulk_insert(), it’s may be used for other am like ours, but also make it easy to cause
unnecessary troubles.

Shall we remove it before we provide an example for developers to avoid that?


Zhang Mingli
www.hashdata.xyz

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Incremental backup from a streaming replication standby fails
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: tiny step toward threading: reduce dependence on setlocale()