Thread: Daisy chaining replication slaves ?

Daisy chaining replication slaves ?

From
Rob Cowell
Date:

Hi,

 

I’m a postgres newbie (in fact a DB newbie if I’m honest J)

 

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.

Re: Daisy chaining replication slaves ?

From
"Albe Laurenz"
Date:
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