Daisy chaining replication slaves ?

Started by Rob Cowellalmost 14 years ago2 messagesgeneral
Jump to latest
#1Rob Cowell
rob.cowell@transversal.com

Hi,

I'm a postgres newbie (in fact a DB newbie if I'm honest :))

I'm just wondering if there is a way to slave from a slave server?
I have a Postgres9.1.3 master serving up data quite happily to the web applications, and I have also set up a slave via streaming replication.
I've now been asked by my manager to set up a secondary slave, slaving off the first slave - e.g.

Master (DB1) --> Slave (DB2) --> Secondary_Slave (DB3)

Is there an easy way to accomplish this?
In my tests last night I setup the DB3 server to replicate from DB2, but for some reason it was complaining about 'max_wal_senders' being set to 1 on the master.
If all the settings are pointing DB3 at DB2, why would it be trying to talk to DB1 instead?

Cheers,
Rob.

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Rob Cowell (#1)
Re: Daisy chaining replication slaves ?

Rob Cowell wrote:

I'm just wondering if there is a way to slave from a slave server?

I have a Postgres9.1.3 master serving up data quite happily to the web

applications, and I have also

set up a slave via streaming replication.

I've now been asked by my manager to set up a secondary slave, slaving

off the first slave

That is not possible in 9.1.
In 9.2 there will be such a feature:

http://www.postgresql.org/docs/devel/static/warm-standby.html#CASCADING-
REPLICATION

You can try it with the beta version, that will also benefit
development.

Yours,
Laurenz Albe