Re: fsync = true beneficial on ext3? - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: fsync = true beneficial on ext3?
Date
Msg-id 20040209041830.GA13045@svana.org
Whole thread Raw
In response to Re: fsync = true beneficial on ext3?  (Mark Kirkwood <markir@paradise.net.nz>)
Responses Re: fsync = true beneficial on ext3?
List pgsql-general
On Mon, Feb 09, 2004 at 03:13:08PM +1300, Mark Kirkwood wrote:
> FYI - Ext3 has 3 modes :
>
> data=ordered(default) : metadata is journaled (at write time data is
> written before metadata - i.e ordered)
> data=journal: data and metadata are journaled
> data=writeback: metadata journaled (no ordering at write time)

Thanks for that.

> The default will not help to protect database integrity if fsync is
> false (as only metadata is journaled)
>
> Will data=journal mode help? I am uncertain. A casual reading if these
> definitions suggests that it *might* - anyone know for sure?

My problem is that journalling works on a per-file basis. ie, the data for a
file is written before that file's metadata. However, the fsync is used for
the WAL segments and if you can't guarentee the WAL will hit the disk before
the data segments (different files), you're stuffed I think.

Or maybe WAL is not that sensitive to that kind of reordering. Maybe it only
depends on the WAL being consistant.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> (... have gone from d-i being barely usable even by its developers
> anywhere, to being about 20% done. Sweet. And the last 80% usually takes
> 20% of the time, too, right?) -- Anthony Towns, debian-devel-announce

Attachment

pgsql-general by date:

Previous
From: Kris Jurka
Date:
Subject: Re: PostgreSQL 7.4.1 and pgdb.py
Next
From: "Marc G. Fournier"
Date:
Subject: Re: [pgsql-advocacy] Fwd: Favorite DB poll on ORA