Russell Smith wrote:
> On Sun, 3 Jul 2005 03:51 pm, Tom Lane wrote:
> > Bruce Momjian <> 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                        |               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to