Fri Dec 1 02:33:15 PST 2006
- Previous message: [Slony1-general] new set in same replication schema???
- Next message: [Slony1-general] Recommended maximum slaves per master
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Friday 01 December 2006 10:05, Ashish Karalkar wrote: | I am running the folowing script and getting the | error "syntax error at or near node" | | #!/bin/sh | | CLUSTER=cluqsweb | DB1=qsweb | DB2=qswebslave | PREAMBLE="cluster name = $CLUSTER | node 1 admin conninfo = 'dbname=qsweb | host=172.18.5.155 user=postgres password = postgres'; | node 2 admin conninfo = 'dbname=qswebslave | host=172.18.5.141 user=postgres password= postgres'; | " you can't split a shell variable assignment over more than one line this way. Write it in one line. | origin=1 | subscriber=2 | mainset=1 | | | slonik <<_EOF_ | $PREAMBLE | | init cluster (id = 1, comment ='Master Node 1'); don't "init cluster" again. This is wrong. | create set (id = $mainset, origin = $origin,comment = | 'Set $mainset - all qsweb tables'); | set add table (set id = $mainset, origin = $origin, | id=1,fully qualified name | ='public.admin_owner',comment=' admin_owner'); it's not a bad idea to trap errors here: try { create set (id = 2, origin = $origin, comment = 'new tables'); set add table (set id = 2, origin = $origin, id = $new_tab_id, full qualified name = 'public.admin_owner', comment = 'Table public.admin_owner'); } on error { echo 'error create set'; exit -1; } Also: $mainset is the set you want to add the new table to, no? You need to create a _new_ set, where you first add your tables to. Later you merge the two sets. So use "id=2" as "set id". | # waiting for event | | WAIT FOR EVENT ( | ORIGIN = ALL, | | CONFIRMED = ALL, | WAIT ON = 1 | ); | | | store node (id = 2, comment ='Slave Node 1'); | store path (server = 1, client = 2, | conninfo ='dbname=qsweb host=172.18.5.155 | user=postgres password = postgres'); | store path (server = 2, client = 1, | conninfo ='dbname=qswebslave host=172.18.5.141 | user=postgres password = postgres'); | store listen (origin = $origin, provider = 1, receiver | = 2); | store listen (origin = $origin, provider = 2, receiver | = 1); | | | _EOF_ all this from "store node" on does not belong to a "add tables to set" procedure. You need to issue a merge set ( id=1, add id=2, origin=1 ); here. | Can you please tell me where I am doing wrong Ciao, Thomas -- Thomas Pundt <thomas.pundt at rp-online.de> ---- http://rp-online.de/ ----
- Previous message: [Slony1-general] new set in same replication schema???
- Next message: [Slony1-general] Recommended maximum slaves per master
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list