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