pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Question about multiple slaves and Master loss.
4+ messages / 3 participants
[nested] [flat]

* Question about multiple slaves and Master loss.
@ 2011-12-07 17:04 Chris Hoover <revoohc@gmail.com>
  2011-12-07 17:58 ` Re: Question about multiple slaves and Master loss. Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Chris Hoover @ 2011-12-07 17:04 UTC (permalink / raw)
  To: pgsql-admin

I'm pretty sure that the answer to this question is no, but I wanted to
verify.

Given the following scenario (pg 9.0):

Server A (Master), Server B (A's streaming replication Slave), Server C
(A's streaming replication Slave)

If you lose Server A, is there anyway to promote Server B to master and
keep Server C as B's slave without having to rebuild C from a backup of B?

Basically, I'd like to be able to have 2 slaves running so that when the
master goes down, we can bring one slave online, and still have the ability
to very quickly recover if the new master where to fail before server A
could be recovered.

Thanks,

Chris

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Question about multiple slaves and Master loss.
  2011-12-07 17:04 Question about multiple slaves and Master loss. Chris Hoover <revoohc@gmail.com>
@ 2011-12-07 17:58 ` Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>
  2011-12-07 18:11   ` Re: Question about multiple slaves and Master loss. Evan Rempel <erempel@uvic.ca>
  0 siblings, 1 reply; 4+ messages in thread

From: Nicholson, Brad (Toronto, ON, CA) @ 2011-12-07 17:58 UTC (permalink / raw)
  To: Chris Hoover <revoohc@gmail.com>; pgsql-admin

From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Chris Hoover
Sent: Wednesday, December 07, 2011 12:05 PM
To: pgsql-admin@postgresql.org Admin
Subject: [ADMIN] Question about multiple slaves and Master loss.

I'm pretty sure that the answer to this question is no, but I wanted to verify.

Given the following scenario (pg 9.0):

Server A (Master), Server B (A's streaming replication Slave), Server C (A's streaming replication Slave)

If you lose Server A, is there anyway to promote Server B to master and keep Server C as B's slave without having to rebuild C from a backup of B?

Basically, I'd like to be able to have 2 slaves running so that when the master goes down, we can bring one slave online, and still have the ability to very quickly recover if the new master where to fail before server A could be recovered.

Thanks,

Chris

Not that I am aware of.  In practice though, C and B should me more or less equivalent so as long as you are using a differential copy like rsync you should be able to bring C up as a replica of B very quickly.  There is of course a small window though where you are not protected.

Brad.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Question about multiple slaves and Master loss.
  2011-12-07 17:04 Question about multiple slaves and Master loss. Chris Hoover <revoohc@gmail.com>
  2011-12-07 17:58 ` Re: Question about multiple slaves and Master loss. Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>
@ 2011-12-07 18:11   ` Evan Rempel <erempel@uvic.ca>
  2011-12-07 18:15     ` Re: Question about multiple slaves and Master loss. Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Evan Rempel @ 2011-12-07 18:11 UTC (permalink / raw)
  To: Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>; +Cc: Chris Hoover <revoohc@gmail.com>; pgsql-admin

Can you have a slave of a slave?

Basically set up

A --> B --> C
also
A --> D --> E

if A goes down, promote B which is protected by C
If B goes down, D is your protection for A
If C goes down, who cares.

It takes 5 machines, but would give great protection.

Evan.


Nicholson, Brad (Toronto, ON, CA) wrote:
> *From:* pgsql-admin-owner@postgresql.org 
> [mailto:pgsql-admin-owner@postgresql.org] *On Behalf Of *Chris Hoover
> *Sent:* Wednesday, December 07, 2011 12:05 PM
> *To:* pgsql-admin@postgresql.org Admin
> *Subject:* [ADMIN] Question about multiple slaves and Master loss.
> 
>  
> 
> I'm pretty sure that the answer to this question is no, but I wanted to 
> verify.
> 
>  
> 
> Given the following scenario (pg 9.0):
> 
>  
> 
> Server A (Master), Server B (A's streaming replication Slave), Server C 
> (A's streaming replication Slave)
> 
>  
> 
> If you lose Server A, is there anyway to promote Server B to master and 
> keep Server C as B's slave without having to rebuild C from a backup of B? 
> 
>  
> 
> Basically, I'd like to be able to have 2 slaves running so that when the 
> master goes down, we can bring one slave online, and still have the 
> ability to very quickly recover if the new master where to fail before 
> server A could be recovered.
> 
>  
> 
> Thanks,
> 
>  
> 
> Chris
> 
>  
> 
> Not that I am aware of.  In practice though, C and B should me more or 
> less equivalent so as long as you are using a differential copy like 
> rsync you should be able to bring C up as a replica of B very quickly.  
> There is of course a small window though where you are not protected.
> 
>  
> 
> Brad.
> 


-- 
Evan Rempel                               erempel@uvic.ca
Senior Systems Administrator                 250.721.7691
Unix Services, University Systems, University of Victoria



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Question about multiple slaves and Master loss.
  2011-12-07 17:04 Question about multiple slaves and Master loss. Chris Hoover <revoohc@gmail.com>
  2011-12-07 17:58 ` Re: Question about multiple slaves and Master loss. Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>
  2011-12-07 18:11   ` Re: Question about multiple slaves and Master loss. Evan Rempel <erempel@uvic.ca>
@ 2011-12-07 18:15     ` Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Nicholson, Brad (Toronto, ON, CA) @ 2011-12-07 18:15 UTC (permalink / raw)
  To: Evan Rempel <erempel@uvic.ca>; +Cc: Chris Hoover <revoohc@gmail.com>; pgsql-admin

> -----Original Message-----
> From: Evan Rempel [mailto:erempel@uvic.ca]
> Sent: Wednesday, December 07, 2011 1:12 PM
> To: Nicholson, Brad (Toronto, ON, CA)
> Cc: Chris Hoover; pgsql-admin@postgresql.org Admin
> Subject: Re: [ADMIN] Question about multiple slaves and Master loss.
> 
> Can you have a slave of a slave?
> 
> Basically set up
> 
> A --> B --> C
> also
> A --> D --> E
> 
> if A goes down, promote B which is protected by C
> If B goes down, D is your protection for A
> If C goes down, who cares.
> 
> It takes 5 machines, but would give great protection.
> 

That's called cascaded replication.  It's not currently supported, but coming in 9.2 I believe.

Brad.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2011-12-07 18:15 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-12-07 17:04 Question about multiple slaves and Master loss. Chris Hoover <revoohc@gmail.com>
2011-12-07 17:58 ` Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>
2011-12-07 18:11   ` Evan Rempel <erempel@uvic.ca>
2011-12-07 18:15     ` Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox