Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. add in a schema only dump onto the new slave
  2.  
  3. ## add the node to the cluster
  4. slonik <<_EOF_
  5. cluster name = cross_slony;
  6. node 1 admin conninfo = 'dbname=ubermaster host=MASTER user=slony password=PASSWORD';
  7. node 2 admin conninfo = 'dbname=ubermaster host=SLAVE user=slony password=PASSWORD';
  8. store node (id=2, comment = 'PSI Slave Node 1');
  9. store path (server = 1, client = 2, conninfo='dbname=ubermaster host=MASTER user=slony password=PASSWORD');
  10. store path (server = 2, client = 1, conninfo='dbname=ubermaster host=SLAVE user=slony password=PASSWORD');
  11. _EOF_
  12.  
  13. turn on slony on slave
  14.  
  15. ## subscribe node to the set
  16. slonik <<_EOF_
  17. cluster name = cross_slony;
  18. node 1 admin conninfo = 'dbname=ubermaster host=MASTER user=slony password=PASSWORD';
  19. node 2 admin conninfo = 'dbname=ubermaster host=SLAVE user=slony password=PASSWORD';
  20. subscribe set ( id = 1, provider = 1, receiver = 2, forward = no);
  21. _EOF_
  22.  
  23. Subscription is picked up fine on the slave:
  24.  
  25. 2010-04-29 12:38:44 GMT DEBUG2 remoteWorkerThread_1: Received event 1,3486676 ENABLE_SUBSCRIPTION
  26. 2010-04-29 12:38:44 GMT DEBUG1 copy_set 1
  27. 2010-04-29 12:38:44 GMT DEBUG4 version for "dbname=ubermaster host=MASTER user=slony password=PASSWORD" is 80310
  28. 2010-04-29 12:38:44 GMT DEBUG1 remoteWorkerThread_1: connected to provider DB
  29. 2010-04-29 12:38:44 GMT DEBUG2 remoteWorkerThread_1: all tables for set 1 found on subscriber
  30. 2010-04-29 12:38:44 GMT DEBUG2 remoteWorkerThread_1: copy_set SYNC found, use event seqno 3486674.
  31. 2010-04-29 12:38:44 GMT DEBUG2 remoteWorkerThread_1: 0.010 seconds to build initial setsync status
  32. 2010-04-29 12:38:44 GMT DEBUG1 remoteWorkerThread_1: disconnected from provider DB
  33. 2010-04-29 12:38:44 GMT DEBUG1 copy_set 1 done in 0.043 seconds
  34. 2010-04-29 12:38:44 GMT CONFIG enableSubscription: sub_set=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement