Re: large inserts and fsync

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aaron Burnett <aburnett(at)bzzagent(dot)com>
Cc: Sam Mason <sam(at)samason(dot)me(dot)uk>, pgsql-general(at)postgresql(dot)org
Subject: Re: large inserts and fsync
Date: 2008-09-05 15:47:48
Message-ID: 25122.1220629668@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Aaron Burnett <aburnett(at)bzzagent(dot)com> writes:
> On 9/5/08 11:10 AM, "Sam Mason" <sam(at)samason(dot)me(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Anderson dos Santos Donda 2008-09-05 19:52:52 Error Installing Postgre 8.3 Silent Mod
Previous Message Alan Hodgson 2008-09-05 15:39:08 Re: large inserts and fsync