Re: SCSI vs. IDE performance test - Mailing list pgsql-general

From Tom Lane
Subject Re: SCSI vs. IDE performance test
Date
Msg-id 22405.1067355373@sss.pgh.pa.us
Whole thread Raw
In response to Re: SCSI vs. IDE performance test  (Allen Landsidel <all@biosys.net>)
Responses Re: SCSI vs. IDE performance test  (Greg Stark <gsstark@mit.edu>)
List pgsql-general
Allen Landsidel <all@biosys.net> writes:
> Tom, this discussion brings up something that's been bugging me about the
> recommendations for getting more performance out of PG.. in particular the
> one that suggests you put your WAL files on a different physical drive from
> the database.
> ...
> With the DB and the WAL on different drives, it seems possible to me that
> drive2 could've fsync()'d or otherwise properly written all of the data
> out, but drive1 could have failed somewhere along the way and not actually
> written the data to the DB.

Drive failure, in terms of losing something the drive claimed it had
written successfully, is not something that we can protect against.
For that, you go to your backup tapes.  I don't see that it makes any
difference whether the database is spread across one drive or several;
you could still have a scenario where the claimed-complete write to
a data file failed to happen and then we recorded a checkpoint anyway.

Now, if the data drive fails to write and we can detect that, then we're
OK, because we won't record a checkpoint.  We can redo the write based
on the contents of WAL after the problem's been fixed.

This is another reason why the IDE lie-about-write-completion behavior
is a Bad Idea: if the drive accepts data and then later has a problem
writing it, there is no way for it to report that fact --- and it's
too late anyhow since we've already taken other actions on the
assumption that the write is done.  I'm not at all sure what IDE drives
do when they have a failure writing out cached buffers; anyone have
experience with that?

            regards, tom lane

pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Newbie-question
Next
From: Stephan Szabo
Date:
Subject: Re: Newbie-question