Re: Question about switchover with PG9 replication

From: Robert Treat <rob(at)xzilla(dot)net>
To: Cyril Scetbon <cyril(dot)scetbon(at)free(dot)fr>
Cc: "Wouter D'Haeseleer" <wdh(at)vasco(dot)com>, Jean-Armel Luce <jaluce06(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question about switchover with PG9 replication
Date: 2011-02-28 04:11:54
Message-ID: AANLkTimmE-erT+AKHti3kSQbtZH8J2PaB+qW6jwS6oSe@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Feb 27, 2011 at 3:46 AM, Cyril Scetbon <cyril(dot)scetbon(at)free(dot)fr> wrote:
> Le 07/02/2011 09:57, Wouter D'Haeseleer a écrit :
>
> Question 1 : is it possible to have such a replication configuration with
> the streaming replication of PG9 (cascaded replication) ?
>
> Nope, as far as I have tested pg only has 1 master and can have a number of
> slaves, so having 2 masters is not possible.
>
> The second host named master2 is a slave which has slaves too, not a master
> on which you can write.
>

It's good to point that out for those that didn't pick up on that, but
unfortunately for you it doesn't change the equation wrt your
scenario.

> Question 2 : All the procedures I have seen describing a switchover between
> 2 PG servers require to copy (or rsync) the database from the new master
> (old slave) to the new slave (old master).
> Is it possible to do switchover between sites (between PGMaster1 and
> PGMaster2) whithout copying all the database from the new PG master to the
> new PG slave ?
> If it is not possible yet, shall it be possible in future releases ?
>
> Nope this is not possible, pg requires to have an updates basebackup at the
> slave, this is because if you loose a lot of streamed wal files it is
> impossible for the slave to catch up and have consistent data.
>

Yeah, this is kind of a cop-out because in a switchover you'd be able
to garauntee no loss of wal (stream or file based). The issue is more
just that the built in replication system isn't very mature yet. It's
being worked on, and switchover is something on the list, but it's not
an option yet.

Robert Treat
play: xzilla.net
work: omniti.com
hiring: l42.org/Lg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Harris 2011-02-28 04:16:41 Re: ERROR: missing chunk number 0 for toast value 382548694 in pg_toast_847386
Previous Message Vibhor Kumar 2011-02-28 04:06:25 Re: ERROR: missing chunk number 0 for toast value 382548694 in pg_toast_847386