Re: Simplifying wal_sync_method

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Simplifying wal_sync_method
Date: 2005-08-08 21:03:28
Message-ID: 9173.1123535008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Currently, here are the options available for wal_sync_method:
> #wal_sync_method = fsync # the default varies across platforms:
> # fsync, fdatasync, fsync_writethrough,
> # open_sync, open_datasync

> I don't understand why we support so many values.

Because there are so many platforms with different subsets of these APIs
and different performance characteristics for the ones they do have.

> It seems 'fsync' should be fdatasync(), and if that is not available,
> fsync().

I have yet to see anyone do any systematic testing of the different
options on different platforms. In the absence of hard data, proposing
that we don't need some of the options is highly premature.

> In fact, 8.1 uses O_DIRECT if available,

That's a decision that hasn't got a shred of evidence to justify
imposing it on every platform.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2005-08-08 21:06:16 Re: shrinking the postgresql.conf
Previous Message Matt Miller 2005-08-08 21:01:09 Re: PL/pgSQL: SELECT INTO EXACT