Reversing flow of WAL shipping

Поиск
Список
Период
Сортировка
Искать

Reversing flow of WAL shipping

От:
David Jantzen <djantzen@ql2.com>
Дата:
Hey Folks,

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?

Thanks,
David

Re: Reversing flow of WAL shipping

От:
Yaroslav Tykhiy <yar@barnet.com.au>
Дата:
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
FAQ