Re: WAL to RAW devices ?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Alex Vinogradovs <AVinogradovs(at)Clearpathnet(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: WAL to RAW devices ?
Date: 2007-09-01 01:01:06
Message-ID: 20070901010106.GS8046@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alex Vinogradovs wrote:
> Probably you missed that part... In my setup, I need at least
> 2 boxes going after those files, while 3rd box keeps on writing
> to them... I can't mount ext2 even in R/O mode while it's being
> written to by another guy. I can't unmount it before mounting
> exclusively on any of them either, since PG will be writing to
> that location. The only way is to do the WAL shipping, which
> probably wouldn't be that bad since the copying would be done
> via DMA, but still isn't as good as it could be since that would
> utilize the same spindles...

Oh, I see.

What I've seen described is to put a PITR slave on a filesystem with
snapshotting ability, like ZFS on Solaris.

You can then have two copies of the PITR logs. One gets a postmaster
running in "warm standby" mode, i.e. recovering logs in a loop. The
other one, in a sort of jail (I don't know the Solaris terminology for
this) stops the recovery and enters normal mode. You can query it all
you like at that point.

Periodically you stop the server in normal mode, resync the snapshot
(which basically resets the "modified" block list in the filesystem),
take a new snapshot, create the jail and stop the recovery mode again.
So you have a fresher postmaster for queries.

It's not as good as having a true hot standby, for sure. But it seems
it's good enough while we wait.

--
Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"Those who use electric razors are infidels destined to burn in hell while
we drink from rivers of beer, download free vids and mingle with naked
well shaved babes." (http://slashdot.org/comments.pl?sid=44793&cid=4647152)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alex Vinogradovs 2007-09-01 01:10:02 Re: WAL to RAW devices ?
Previous Message Alex Vinogradovs 2007-09-01 00:45:50 Re: WAL to RAW devices ?