From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Simplifying wal_sync_method |
Date: | 2005-08-08 21:38:02 |
Message-ID: | 200508082138.j78Lc2x07442@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> 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.
Right, and our current behavior makes it harder for people to even know
the supported options.
> > 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.
No one is every going to do it, so we might as well make the best guess
we have. I think any platform where the *data* options are slower than
the non-*data* options is broken, and if that logic holds, we might as
well just use *data* by default if we can, which is my proposal.
> > 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.
Right, and there is no evidence it hurts, so we do our best until
someone comes up with data to suggest we are wrong. The same should be
done with *data*.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-08-08 21:38:59 | Re: Simplifying wal_sync_method |
Previous Message | Tom Lane | 2005-08-08 21:18:53 | Re: PL/pgSQL: SELECT INTO EXACT |