Re: no universally correct setting for fsync

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: no universally correct setting for fsync
Дата
Msg-id 4BE3E205020000250003138F@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: no universally correct setting for fsync  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: no universally correct setting for fsync  (Josh Berkus <josh@agliodbs.com>)
Re: no universally correct setting for fsync  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> wrote:
> I think the critical question is really whether you are prepared
> to lose your database.
Precisely; and the docs don't make that at all clear.  They mention
the possibility of database corruption, but downplay it:
| When fsync is disabled, the operating system is allowed to do its
| best in buffering, ordering, and delaying writes. This can result
| in significantly improved performance. However, if the system
| crashes, the results of the last few committed transactions might
| be lost in part or whole. In the worst case, unrecoverable data
| corruption might occur.

> [valid use case for fsync=off]
> 
> So I think its true that there is no universally right answer.
> Maybe the criteria mentioned in the last para need tweaking some,
> though.
I think it goes beyond "tweaking" -- I think we should have a bald
statement like "don't turn this off unless you're OK with losing the
entire contents of the database cluster."  A brief listing of some
cases where that is OK might be illustrative.
I never meant to suggest any statement in that section is factually
wrong; it's just all too rosy, leading people to believe it's no big
deal to turn it off.
-Kevin


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

Предыдущее
От: Andy Lester
Дата:
Сообщение: Re: PATCH: Minor notes in CLUSTER page
Следующее
От: Tom Lane
Дата:
Сообщение: Re: possible memory leak with SRFs