based on the tutorial. /usr/lib/postgresql/9.1/bin/slonik < create_set.slonik <stdin>:8: waiting for event (1,5000000011) to be confirmed on node 2 same output for (very) long time, I have to kill slonik preamble.slonik cluster name = slony; node 1 admin conninfo = 'dbname=slony_bench host=192.168.100.165 user=replicator'; node 2 admin conninfo = 'dbname=slony_bench host=192.168.100.237 user=replicator'; node 3 admin conninfo = 'dbname=slony_bench host=192.168.122.111 user=replicator'; node 4 admin conninfo = 'dbname=slony_bench host=192.168.122.22 user=replicator'; create_set.slonik include </tmp/preamble.slonik>; init cluster (id = 1); create set (id = 1, origin = 1); set add table (set id=1, tables='public\\.*'); store node (id=2, event node=1); store node (id=3, event node=1); store node (id=4, event node=2); store path (server = 1, client = 2, conninfo='dbname=slony_bench host=192.168.100.165 user=replicator'); store path (server = 1, client = 3, conninfo='dbname=slony_bench host=192.168.100.165 user=replicator'); store path (server = 1, client = 4, conninfo='dbname=slony_bench host=192.168.100.165 user=replicator'); store path (server = 2, client = 1, conninfo='dbname=slony_bench host=192.168.100.237 user=replicator'); store path (server = 2, client = 3, conninfo='dbname=slony_bench host=192.168.100.237 user=replicator'); store path (server = 2, client = 4, conninfo='dbname=slony_bench host=192.168.100.237 user=replicator'); store path (server = 3, client = 1, conninfo='dbname=slony_bench host=192.168.122.111 user=replicator'); store path (server = 3, client = 2, conninfo='dbname=slony_bench host=192.168.122.111 user=replicator'); store path (server = 3, client = 4, conninfo='dbname=slony_bench host=192.168.122.111 user=replicator'); store path (server = 4, client = 1, conninfo='dbname=slony_bench host=192.168.122.22 user=replicator'); store path (server = 4, client = 2, conninfo='dbname=slony_bench host=192.168.122.22 user=replicator'); store path (server = 4, client = 3, conninfo='dbname=slony_bench host=192.168.122.22 user=replicator');
it happens that the problem come from the node 2 cascading to node 4.
I change the order of store node and it fix the situation. It is maybe expected but slonik should prevent the deadlock here. store node (id=2, event node=1); store node (id=3, event node=1); store path (server = 1, client = 2, conninfo='dbname=slony_bench host=192.168.100.165 user=replicator'); store path (server = 1, client = 3, conninfo='dbname=slony_bench host=192.168.100.165 user=replicator'); store path (server = 2, client = 1, conninfo='dbname=slony_bench host=192.168.100.237 user=replicator'); store path (server = 2, client = 3, conninfo='dbname=slony_bench host=192.168.100.237 user=replicator'); store path (server = 3, client = 1, conninfo='dbname=slony_bench host=192.168.122.111 user=replicator'); store path (server = 3, client = 2, conninfo='dbname=slony_bench host=192.168.122.111 user=replicator'); store node (id=4, event node=2); store path (server = 1, client = 4, conninfo='dbname=slony_bench host=192.168.100.165 user=replicator'); store path (server = 2, client = 4, conninfo='dbname=slony_bench host=192.168.100.237 user=replicator'); store path (server = 3, client = 4, conninfo='dbname=slony_bench host=192.168.122.111 user=replicator'); store path (server = 4, client = 1, conninfo='dbname=slony_bench host=192.168.122.22 user=replicator'); store path (server = 4, client = 2, conninfo='dbname=slony_bench host=192.168.122.22 user=replicator'); store path (server = 4, client = 3, conninfo='dbname=slony_bench host=192.168.122.22 user=replicator');
This is an issue with the tutorial. store node(id=2,event node=1) store node(id=3,event node=1) store node(id=4,event node=2); should not work, with until the third line has been propogated to node 2. Consider these example as why store node(id=2,event node=1) store node(id=3,event node=1) store node(id=3,event node=2); The tutorial should be updated to either use event node=1 or it could be updated to put the store paths in between
(In reply to comment #3) > This is an issue with the tutorial. > > store node(id=2,event node=1) > store node(id=3,event node=1) > store node(id=4,event node=2); > > should not work, with until the third line has been propogated to node 2. > > Consider these example as why > > store node(id=2,event node=1) > store node(id=3,event node=1) > store node(id=3,event node=2); > > The tutorial should be updated to either use event node=1 > or it could be updated to put the store paths in between I abused of the tutorial reference here, the tutorial is only for 2 nodes. While I understand why it does not work,maybe slonik can check that there is no 'deadlock' in the slonik script.
Checking for deadlock due to missing paths sounds like a good idea. It was discussed when the auto-wait for stuff was proposed but we didn't want to bite off too much at once. Patches always welcome :)