Le 22 juin 2009 à 17:24, Tom Lane <tgl@sss.pgh.pa.us> a écrit :
> Simon Riggs <simon@2ndQuadrant.com> writes:
>> I was thinking it might be beneficial to be able to defer writing WAL
>> until COPY is complete, so heap_sync would either fsync the whole
>> heap
>> file or copy the whole file to WAL.
>
> What about indexes?
Skip this optimisation if there are any.
It's already Common practise to create them only after copy succeeded
when possible for better bulk loading perfs.
Then there's also the copy + Insert ... Select ... technique.
--
dim