Re: fsync = true beneficial on ext3?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: fsync = true beneficial on ext3?
Дата
Msg-id 200402091642.i19Gg7O11852@candle.pha.pa.us
обсуждение исходный текст
Ответ на fsync = true beneficial on ext3?  ("Ed L." <pgsql@bluepolka.net>)
Ответы Re: fsync = true beneficial on ext3?  (JM <jerome@gmanmi.tv>)
Список pgsql-general
Ed L. wrote:
>
> I'm curious what the consensus is, if any, on use of fsync on ext3
> filesystems with postgresql 7.3.4 or later.  I did some recent performance
> tests demonstrating a 45%-70% performance improvement for simple inserts
> with fsync off on one particular system.  Does fsync = true buy me any
> additional recoverability beyond ext3's journal recovery?

Yes, it does.  Without fsync, you can't be sure the data has been pushed
to the disk drive in case of an OS crash or power failure.

> If we write something without sync'ing, presumably it's immediately
> journaled?  So even if the DB crashes prior to fsync'ing, are we fully
> recoverable?  I've been running a few pgsql clusters on ext3 with fsync =
> false, suffered numerous OS crashes, and have yet to lose any data or see
> any corruption from any of those crashes.  Have I just been lucky?

The fsync makes sure it hits the drive, rather than staying in the
kernel cache during an OS failure.

--
  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, Pennsylvania 19073

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

Предыдущее
От: "Mark Cubitt"
Дата:
Сообщение: Oracle SQLNet on same server as Postgres
Следующее
От: "nednieuws | charles"
Дата:
Сообщение: Re: Where do I find the init-script