Re: large inserts and fsync - Mailing list pgsql-general

From Tom Lane
Subject Re: large inserts and fsync
Date
Msg-id 25122.1220629668@sss.pgh.pa.us
Whole thread Raw
In response to Re: large inserts and fsync  (Aaron Burnett <aburnett@bzzagent.com>)
Responses Re: large inserts and fsync
List pgsql-general
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

pgsql-general by date:

Previous
From: Alan Hodgson
Date:
Subject: Re: large inserts and fsync
Next
From: "Anderson dos Santos Donda"
Date:
Subject: Error Installing Postgre 8.3 Silent Mod