Re: Simplifying wal_sync_method - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Simplifying wal_sync_method
Date
Msg-id 9173.1123535008@sss.pgh.pa.us
Whole thread Raw
In response to Simplifying wal_sync_method  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Simplifying wal_sync_method  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Simplifying wal_sync_method  ("Jeffrey W. Baker" <jwbaker@acm.org>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.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


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: shrinking the postgresql.conf
Next
From: Bruce Momjian
Date:
Subject: Re: Simplifying wal_sync_method