Re: Disable WAL backup pages when fsync is off - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Disable WAL backup pages when fsync is off
Date
Msg-id 200507040157.j641v1w21603@candle.pha.pa.us
Whole thread Raw
In response to Disable WAL backup pages when fsync is off  (Bruce Momjian <pgman@candle.pha.pa.us>)
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Disable WAL backup pages when fsync is off
Next
From: Bruce Momjian
Date:
Subject: Re: contrib/pgcrypto patch for OpenSSL 0.9.8