pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: Franck Routier <franck.routier@axege.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: 12 disks raid setup
Date: Sat, 01 Mar 2008 13:11:20 -0500
Message-ID: <29628.1204395080@sss.pgh.pa.us> (raw)
In-Reply-To: <dcc563d10803010444m3002be30r1b23fbcfac085336@mail.gmail.com>
References: <1204285894.11773.33.camel@franck-gusty>
	<dcc563d10802290613v482f52dr43ea95b52886de31@mail.gmail.com>
	<1204296705.11773.51.camel@franck-gusty>
	<Pine.GSO.4.64.0802291019570.28452@westnet.com>
	<47C8A6D9.1050502@Sheeky.Biz>
	<Pine.GSO.4.64.0802292347250.145@westnet.com>
	<1204367277.9116.16.camel@franck-gusty>
	<dcc563d10803010444m3002be30r1b23fbcfac085336@mail.gmail.com>

"Scott Marlowe" <scott.marlowe@gmail.com> writes:
> On Sat, Mar 1, 2008 at 4:27 AM, Franck Routier <franck.routier@axege.com> wrote:
>> Well, am I just wrong, or the file system might also heavily rely on
>> cache, especially as I use XFS ?
>> 
>> So anyway Postgresql has no way to know if the data is really on the
>> disk, and in case of a brutal outage, the system may definitely lose
>> data, wether there is another level of caching (Raid controller) or
>> not...

> nope.  assuming your disk subsystem doesn't lie about write
> completion, then postgresql can recover from complete and sudden loss
> of power without any data loss.

Franck does have a point here: we are expecting the filesystem to tend
to its own knitting.  If a power failure corrupts the filesystem so
badly that we can't find the WAL files, or their contents are badly
scrambled, then we're screwed.  Most modern filesystems defend
themselves against that using journaling, which is exactly the same
idea as WAL but applied to filesystem metadata.

We do expect that when we fsync a file, by the time the OS reports that
that's done both the file contents and its metadata are safely on disk.
This is part of the specification for fsync, so the OS is clearly broken
if it doesn't get that right.  Whether the OS *can* guarantee it if the
disk drive lies about write completion is something you'd have to ask
the filesystem hackers about.

			regards, tom lane



view thread (15+ messages)  latest in thread

Message-ID: <29628.1204395080@sss.pgh.pa.us>
Permalink:  ../29628.1204395080@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29628.1204395080@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, scott.marlowe@gmail.com, franck.routier@axege.com
  Subject: Re: 12 disks raid setup
  In-Reply-To: <29628.1204395080@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox