Re: Lost rows/data corruption?

From: Marco Colombo <pgsql(at)esiway(dot)net>
To: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Lost rows/data corruption?
Date: 2005-02-16 16:29:13
Message-ID: Pine.LNX.4.61.0502161705290.18326@Megathlon.ESI
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)ESI(dot)it

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Mayer 2005-02-16 17:13:03 Re: PostgreSQL vs. MySQL vs. Oracle, 2005 report card
Previous Message Tom Lane 2005-02-16 15:54:28 Re: hung postmaster?