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

Re: WAL log shipping + Streaming replication PG 9.0 questions

From: Robert Treat <rob(at)xzilla(dot)net>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: isabella(dot)ghiurea(at)nrc-cnrc(dot)gc(dot)ca, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: WAL log shipping + Streaming replication PG 9.0 questions
Date: 2010-10-20 03:42:03
Message-ID: AANLkTimEbGyyVAytVhjug_6zC9hEhbh7k01UxvkaDQZz@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Tue, Oct 19, 2010 at 10:40 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> On Tue, Oct 19, 2010 at 11:46 PM, Isabella Ghiurea
> <isabella(dot)ghiurea(at)nrc-cnrc(dot)gc(dot)ca> wrote:
> > For the last question I ' m still a bit confused: if master_archive off
> line
> > ( no archived WAL's available) what will be state of  standby server ?
> > Basically we are trying to design a solution where WAL archived directory
> is
> > not a "single point of failure"   for whole system ( we are planing to
> have
> > WAL archived master directory on a separate machine and both server
> primary
> > and standby will have read/write here) if this servers fails , we  want
>  to
> >  be able to continue normal user operation on master while standby server
> >  will have some latency.
>
> You have three machines, the first is the master, the second is the
> standby,
> and the last is something like NAS which has the archive area shared by
> them.
> Right?
>
> Even if the archive is unavailable, we can continue normal user operation
> like INSERT/UPDATE/DELETE on the master until its pg_xlog has run out of
> disk space (As I said before, a failure of archive_command continues to
> accumulate unarchived WAL files in pg_xlog). So, you would need to check
> periodically whether the archive is available or not by using a monitoring
> tool, in order to prevent pg_xlog from running out of disk space.
>
> On the other hand, even if the archive is unavailable, if the replication
> connection is alive, the standby can receive the WAL and catch up with the
> master. But, if the replication connection is terminated and the standby
> cannot connect to the master because of the network outage, the standby can
> read no WAL from neither the master nor the archive. In this case, the
> standby would fall behind the master.
>

Just to chime in here, this doesn't necessarily have to "break" your
standby; rather it can happily sit around waiting for the next xlog to show
up. If you can fix connectivity to the NAS, it will happily start replaying
log files and catching up again.

Robert Treat
play:  http://www.xzilla.net
work: http://omniti.com/is/hiring

In response to

pgsql-admin by date

Next:From: maieskyDate: 2010-10-20 12:28:24
Subject: Unable to backup table when quotation marks used in the name
Previous:From: Fujii MasaoDate: 2010-10-20 02:40:34
Subject: Re: WAL log shipping + Streaming replication PG 9.0 questions

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