pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Neil Conway <neilc@samurai.com>
To: Magnus Hagander <mha@sollentuna.net>
Cc: Vig, Sandor (G/FI-2) <Sandor.Vig@audi.hu>
Cc: pgsql-performance@postgresql.org
Subject: Re: PostgreSQL is extremely slow on Windows
Date: Thu, 24 Feb 2005 09:35:47 +1100
Message-ID: <421D0543.6020308@samurai.com> (raw)
In-Reply-To: <6BCB9D8A16AC4241919521715F4D8BCE47697A@algol.sollentuna.se>
References: <6BCB9D8A16AC4241919521715F4D8BCE47697A@algol.sollentuna.se>

Magnus Hagander wrote:
> Yes, fsync=false is very good for bulk loading *IFF* you can live with
> data loss in case you get a crash during load.

It's not merely data loss -- you could encounter potentially 
unrecoverable database corruption.

There is a TODO item about allowing the delaying of WAL writes. If we 
maintain the WAL invariant (that is, a WAL record describing a change 
must hit disk before the change itself does) but simply don't flush the 
WAL at transaction commit, we should be able to get better performance 
without the risk of database corruption (so we would need to keep pages 
modified by the committed transaction pinned in memory until the WAL has 
been flushed, which might be done on a periodic basis).

Naturally, there is a risk of losing data in the period between 
transaction commit and syncing the WAL, but no risk of database 
corruption. This seems a reasonable approach to providing better 
performance for people who don't need the strict guarantees provided by 
fsync=true.

-Neil



view thread (13+ messages)  latest in thread

Message-ID: <421D0543.6020308@samurai.com>
Permalink:  ../421D0543.6020308@samurai.com/
Also on:    postgresql.org/message-id/421D0543.6020308@samurai.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: neilc@samurai.com, mha@sollentuna.net, Sandor.Vig@audi.hu
  Subject: Re: PostgreSQL is extremely slow on Windows
  In-Reply-To: <421D0543.6020308@samurai.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox