Re: Reversing flow of WAL shipping

From: Yaroslav Tykhiy <yar(at)barnet(dot)com(dot)au>
To: David Jantzen <djantzen(at)ql2(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Reversing flow of WAL shipping
Date: 2009-10-22 22:35:57
Message-ID: A0FD7E31-4AE5-406A-9E91-E40366F9330C@barnet.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-hackers

Hi David,

On 22/10/2009, at 2:52 PM, David Jantzen wrote:
> I want to run a warm standby scenario by you. I'm pretty sure it'll
> work, but it's a very large database so even the slightest mistake can
> mean a major setback.
>
> Scenario:
>
> Server A is the provider node, shipping WAL files to Server B. Server
> B is destined to become the provider node (newer hardware), and has a
> sibling Server C that will be the warm standby.
>
> Here's the question: when I turn Server B into the production/provider
> node, it's going to switch into the next timeline. If I then attempt
> to put Server A (or Server C) into recovery mode, will it switch to
> the new current timeline, or complain about being in the older
> timeline? Do I have to take another full backup of Server B after
> it's become the production/provider node?

I did a similar trick more than once with a mission-critical database
by starting with 1 master/provider server (A) and 2 warm standby
servers (B, C), then failing over from A to B, then shipping WAL files
from the new master B to C. However I might be (ab)using the feature
or bug in Postgresql 8.0 that it wouldn't switch to a new timeline in
my environment. (I'd love to find out why it was so.) Please see http://archives.postgresql.org/pgsql-general/2009-07/msg00215.php
for details.

Yar

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Kempter 2009-10-22 23:41:38 select actual data size for a relation?
Previous Message Eric Comeau 2009-10-22 18:29:47 Increasing the length of a VARCHAR column without table rewrite

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-10-22 23:06:30 Re: Right Join Question
Previous Message Bierbryer, Andrew 2009-10-22 18:43:15 Right Join Question

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2009-10-22 23:08:15 Re: per table random-page-cost?
Previous Message Marko Tiikkaja 2009-10-22 22:08:21 Writeable CTEs, again