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=  -
store path(server=2,client=1,conninfo=’host=slave2host,dbname=slave2db,user=slony,password=  -
#Setup path between node 2==>3
store path(server=3,client=2,conninfo=’host=slave3host,dbname=slave3db,user=slony,password=  -
store path(server=2,client=3,conninfo=’host=slave2host,dbname=slave2db,user=slony,password=  -
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.


Popular posts from this blog

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory Linux-x86_64 Error: 2: No such file or directory

PostgreSQL pgBadger

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

PostgreSQL Pgbadger Installation On Linux

Migrating From Oracle to PostgreSQL using ora2pg open source tools