If you insert tuples with COPY into a table created or truncated in the
same transaction, at the end of the COPY it calls heap_sync.

But there cases were people use COPY in a loop with a small amount of data
in each statement.  Now it is calling heap_sync many times, and if NBuffers
is large doing that gets very slow.

Could the heap_sync be safely delayed until the end of the transaction,
rather than the end of the COPY?

Cheers,

Jeff

Reply via email to