Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)
Дата
Msg-id 20210106200304.GQ27507@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
Greetings,

* Peter Geoghegan (pg@bowt.ie) wrote:
> On Wed, Jan 6, 2021 at 11:44 AM Stephen Frost <sfrost@snowman.net> wrote:
> > Having fsync off won't actually cause corruption unless you have an OS
> > crash or don't sync the disks when you reboot the system though- so it's
> > a hedge against certain failure conditions, as is checksums.
>
> I find this argument baffling. Do you really believe this?

Do you really believe it to be wrong?  Do we stop performing the correct
write calls in the correct order to the kernel with fsync being off?  If
the kernel actually handles all of our write calls correctly and we
cleanly shut down and the kernel cleanly shuts down and sync's the disks
before a reboot, will there be corruption from running with fsync off?

If that's the case, I'd certainly be curious to hear under what
conditions, when everything works, we'll end up with corruption simply
from running with fsync off.

I don't mean to imply that I advocate for such- I'd hope that it would
be clear from this discussion that I'm not suggesting that we turn fsync
off, and rather the opposite, that we have both fsync and data checksums
be on by default, but to claim that having fsync off will always, in
every situation, cause corruption is over-stating the case.

Thanks,

Stephen

Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)