Re: PostgreSQL is extremely slow on Windows

From: Neil Conway <neilc(at)samurai(dot)com>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: "Vig, Sandor (G/FI-2)" <Sandor(dot)Vig(at)audi(dot)hu>, pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL is extremely slow on Windows
Date: 2005-02-23 22:35:47
Message-ID: 421D0543.6020308@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-02-23 22:56:41 Re: PostgreSQL is extremely slow on Windows
Previous Message Josh Berkus 2005-02-23 21:02:18 Re: Peformance Tuning Opterons/ Hard Disk Layout