Re: Simplifying wal_sync_method

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Simplifying wal_sync_method
Дата
Msg-id 200508082138.j78Lc2x07442@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Simplifying wal_sync_method  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Simplifying wal_sync_method  (Josh Berkus <josh@agliodbs.com>)
Re: Simplifying wal_sync_method  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> 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.

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@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Simplifying wal_sync_method
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Simplifying wal_sync_method