From: Tom Lane <tgl@sss.pgh.pa.us>
To: John A Meinel <john@arbash-meinel.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org, "Jeffrey W. Baker" <jwbaker@acm.org>
Cc: Steve Poe <spoe@sfnet.cc>
Cc: paul@oxton.com
Subject: Re: PG8 Tuning
Date: Tue, 16 Aug 2005 18:49:59 -0400
Message-ID: <7516.1124232599@sss.pgh.pa.us> (raw)
In-Reply-To: <43021567.1000101@arbash-meinel.com>
References: <1536.217.45.209.171.1123763001.squirrel@www.gradwell.com>
<1123836428.19976.26.camel@amd64-laptop-spoe>
<1123779524.6664.1.camel@toonses.gghcwest.com>
<200508160912.32263.josh@agliodbs.com>
<20050816162531.GB32695@alvh.no-ip.org>
<43021567.1000101@arbash-meinel.com>
John A Meinel <john@arbash-meinel.com> writes:
> Alvaro Herrera wrote:
>> I've been asked this a couple of times and I don't know the answer: what
>> happens if you give XLog a single drive (unmirrored single spindle), and
>> that drive dies? So the question really is, should you be giving two
>> disks to XLog?
> I can propose a simple test. Create a test database. Run postgres,
> insert a bunch of stuff. Stop postgres. Delete everything in the pg_xlog
> directory. Start postgres again, what does it do?
That test would really be completely unrelated to the problem.
If you are able to shut down the database cleanly, then you do not need
pg_xlog anymore --- everything is on disk in the data area. You might
have to use pg_resetxlog to get going again, but you won't lose anything
by doing so.
The question of importance is: if the xlog drive dies while the database
is running, are you going to be able to get the postmaster to shut down
cleanly? My suspicion is "no" --- if the kernel is reporting write
failures on WAL, that's going to prevent writes to the data drives (good
ol' WAL-before-data rule). You could imagine failure modes where the
drive is toast but isn't actually reporting any errors ... but one hopes
that's not a common scenario.
In a scenario like this, it might be interesting to have a shutdown mode
that deliberately ignores writing to WAL and just does its best to get
all the dirty pages down onto the data drives.
In the meantime ... use a mirrored drive for WAL.
regards, tom lane
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, john@arbash-meinel.com, alvherre@alvh.no-ip.org, josh@agliodbs.com, jwbaker@acm.org, spoe@sfnet.cc, paul@oxton.com
Subject: Re: PG8 Tuning
In-Reply-To: <7516.1124232599@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