Friday, September 5, 2008

Re: [GENERAL] large inserts and fsync

Aaron Burnett <aburnett@bzzagent.com> writes:
> On 9/5/08 11:10 AM, "Sam Mason" <sam@samason.me.uk> wrote:
>> Have you tried bundling all the INSERT statements into a single
>> transaction?

> Yes, the developer already made sure of that and I verified.

Hmm, in that case the penalty probably comes from pushing WAL data out
to disk synchronously. It might be worth playing with wal_sync_method
and/or raising wal_buffers.

The trouble with turning fsync off is that a system crash midway through
the import might leave you with a corrupt database. If you're willing
to start over from initdb then okay, but if you are importing into a
database that already contains valuable data, I wouldn't recommend it.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

No comments: