COPY and heap_sync - Mailing list pgsql-hackers

From Jeff Janes
Subject COPY and heap_sync
Date
Msg-id CAMkU=1z0YBPi6Svpji8WBd6vABVQ_+Opm2HyDnJQ07Y32av0-Q@mail.gmail.com
Whole thread Raw
Responses Re: COPY and heap_sync
Re: COPY and heap_sync
Re: COPY and heap_sync
List pgsql-hackers
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

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: ALTER SYSTEM RESET?
Next
From: Michael Paquier
Date:
Subject: Re: Misleading error message in logical decoding for binary plugins