From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Allen Landsidel <all(at)biosys(dot)net> |
Cc: | Rick Gigger <rick(at)alpinenetworking(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: SCSI vs. IDE performance test |
Date: | 2003-10-28 15:36:13 |
Message-ID: | 22405.1067355373@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Allen Landsidel <all(at)biosys(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-10-28 15:38:28 | Re: Newbie-question |
Previous Message | Andrew Sullivan | 2003-10-28 15:28:41 | Re: Newbie-question |