Re: Lost rows/data corruption? - Mailing list pgsql-general

From Marco Colombo
Subject Re: Lost rows/data corruption?
Date
Msg-id Pine.LNX.4.61.0502161705290.18326@Megathlon.ESI
Whole thread Raw
In response to Re: Lost rows/data corruption?  (Scott Marlowe <smarlowe@g2switchworks.com>)
List pgsql-general
On Wed, 16 Feb 2005, Scott Marlowe wrote:

> I know there are write modes in ext3 that will allow corruption on power
> loss (I think it's writeback).  I know little of XFS in a production
> environment, as I run ext3, warts and all.

Yeah, but even in writeback mode, ext3 doesn't lie on fsync. No FS does.

Since PG can't expect any data to be on disk _before_ fsync completes,
it doesn't really make a difference. You can loose data in writeback mode
_if_ the application is not fsync-ing it (XFS only "mode" is similar to
writeback). I'm not aware of any case in which the system can lie about
fsync(), unless the hardware is lying in turn.

One question for gurus: does PG use fsync() on dirty data pages when
they are flushed to disk at checkpoint time? Does it fsync() the
directory in case of file creation/deletion/rename?

.TM.
--
       ____/  ____/   /
      /      /       /            Marco Colombo
     ___/  ___  /   /              Technical Manager
    /          /   /             ESI s.r.l.
  _____/ _____/  _/               Colombo@ESI.it

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: hung postmaster?
Next
From: Ron Mayer
Date:
Subject: Re: PostgreSQL vs. MySQL vs. Oracle, 2005 report card