Skip site navigation (1) Skip section navigation (2)

Re: pg_xlog on separate drive

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: Travis Whitton <tinymountain(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: pg_xlog on separate drive
Date: 2006-12-04 10:56:32
Message-ID: 4573FEE0.2010406@logix-tt.com (view raw or flat)
Thread:
Lists: pgsql-sql
Hi, Travis,

Travis Whitton wrote:
> Hey guys, sorry if this is slightly OT for this list, but I figure it's
> a simple question. If I'm storing pg_xlog on a second non-redundant
> drive using the symlink method and the journal drive were to crash, how
> difficult is recovery? Will Postgresql simply be able to reinitialize
> the journal on a new drive and carry on, or is there more to it than
> that? I realize any pending transactions would be lost, but that's not a
> huge concern for me because everything I'm importing comes from raw data.

The problem is that you risk inconsistency at data and structural level.

When the server crashes, it might happen that some pages in the data
files are written only partially (because most disks have a much smaller
blocksize than the PostgreSQL page size (which is 8k by default)).

Now, when the server cannot reply the WAL log, those half-written pages
will not be repaired, and your data may be inconsistent at a very low
sematic level (duplicate rows, missing rows, broken rows, backend
crashes etc.) with no way to repair.

HTH,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

In response to

Responses

pgsql-sql by date

Next:From: Travis WhittonDate: 2006-12-04 14:04:57
Subject: Re: pg_xlog on separate drive
Previous:From: Tom LaneDate: 2006-12-03 22:22:49
Subject: Re: Query for block updates

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group