Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Adding a Cascaded Replication

In a standard Slony-I configuration all slaves(replicas) communicate directly with the master (origin). Sometimes it is more
desirable to have some of your slaves(replicas) feed off of another replica. This is called a cascaded replica and is supported by
Slony-I For example you might have a Slony-I cluster with 1 replication set (set id=1) and three nodes. The master (origin) for
set 1 (node id=1), a node in a different data center that reads directly from the master (node id=2) and a third node in the same
data center as the slave (node id=3). To the subscription sets in this configuration you need to make sure that paths exist between
nodes 2 and nodes 3. Then to perform the subscription you could use the following slonik commands.
#Setup path between node 1==>2
store path(server=1,client=2,conninfo=’host=masterhost,dbname=masterdb,user=slony,password=  -
slony’);
store path(server=2,client=1,conninfo=’host=slave2host,dbname=slave2db,user=slony,password=  -
slony’);
#Setup path between node 2==>3
store path(server=3,client=2,conninfo=’host=slave3host,dbname=slave3db,user=slony,password=  -
slony’);
store path(server=2,client=3,conninfo=’host=slave2host,dbname=slave2db,user=slony,password=  -
slony’);
subscribe set(set id=1, provider=1, receiver=2,forward=yes);
subscribe set (set id=1,provider=2, receiver=3,forward=yes);
wait for event(origin=1, confirmed=all, wait on=1);
In the above example we define paths from 1==>2 and from 2==>3 but do not define a path between nodes 1===>3. If a path
between node 1 and 3 was defined the data data for set 1 would still flow through node 2 because node 2 is the origin for set 1.
However if node 2 were to fail nodes 1 and 3 would be unable to talk to each other unless a path between nodes 1 and nodes 3
had been defined.
Slony-I requires that all sets from a given origin cascade to each receiver in the same manner. If node 1 was also the origin for
set 2 then set 2 would also need to go directly to node 2 and be cascaded from node 2 to node 3. Node 3 can not receive set 2
from node 1 directly if it is already receiving set 1 via node 2.

Comments

Popular posts from this blog

PostgreSQL Pgbadger Installation On Linux

PostgreSQL pgBadger

How to configure Replication Manager (repmgr) ?

7 Steps to configure BDR replication in postgresql

PostgreSQL Sequence