Re: Disable WAL backup pages when fsync is off
От | Bruce Momjian |
---|---|
Тема | Re: Disable WAL backup pages when fsync is off |
Дата | |
Msg-id | 200507040157.j641v1w21603@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Disable WAL backup pages when fsync is off (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-patches |
Russell Smith wrote: > On Sun, 3 Jul 2005 03:51 pm, Tom Lane wrote: > > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > > The following patch disables WAL backup pages when fsync is off. > > > > This is a good idea why? > > > If it is, why do we write wal at all if fsync is off? Good question. WAL is to recover the file system files in case of a crash. WAL is used in cases where PostgreSQL crashes, but the operating system is still running. WAL brings the file system files back to a consistent state containing all completed transactions. fsync() is for forcing the data to disk so an operating system crash is recoverable. If that isn't happening, the cleanup of partial page writes is hardly important because the system is not consistent. -- 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-patches по дате отправления: