From: Tom Lane
Subject: Re: PG8 Tuning
Date: ,
Msg-id: 7516.1124232599@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: PG8 Tuning  (John A Meinel)
Responses: Re: PG8 Tuning  (John A Meinel)
List: pgsql-performance

Tree view

PG8 Tuning  ("Paul Johnson", )
 Re: PG8 Tuning  (Richard Huxton, )
 [SPAM?] Re: PG8 Tuning  (Steve Poe, )
  Re: [SPAM?] Re: PG8 Tuning  ("Jeffrey W. Baker", )
   Re: [SPAM?] Re: PG8 Tuning  (Jeff Trout, )
   Re: [SPAM?] Re: PG8 Tuning  (Josh Berkus, )
    Re: [SPAM?] Re: PG8 Tuning  (Alvaro Herrera <-ip.org>, )
     Re: [SPAM?] Re: PG8 Tuning  ("Joshua D. Drake", )
     Re: PG8 Tuning  (John A Meinel, )
      Re: PG8 Tuning  (Tom Lane, )
       Re: PG8 Tuning  (John A Meinel, )
        Re: PG8 Tuning  (Tom Lane, )
    Re: [SPAM?] Re: PG8 Tuning  (Michael Stone, )
     Re: PG8 Tuning  (Josh Berkus, )
  Re: [SPAM?] Re: PG8 Tuning  (Tom Arthurs, )
  Re: PG8 Tuning  (Mark Lewis, )
   Re: PG8 Tuning  (Michael Stone, )
 Re: PG8 Tuning  (Michael Stone, )
 Re: PG8 Tuning  ("Merlin Moncure", )

John A Meinel <> 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


pgsql-performance by date:

From: Ron
Date:
Subject: Re: Finding bottleneck
From: Tom Lane
Date:
Subject: Re: [JDBC] Performance problem using V3 protocol in jdbc driver