Tue Mar 7 13:26:21 PST 2006
- Previous message: [Slony1-general] SLONIK syntax error (help needed)
- Next message: [Slony1-general] SLONIK syntax error (help needed)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I cant run the script below . it says the same thing when itry to run any script. <stdin>:5: ERROR: syntax error at or near Try Will someone please enlighten me on what im doin wrong ? Thanks, Sujin Philip #!/bin/sh slonik <<_EOF_ #-- # define the namespace the replication system uses in our example it is # slony_example #-- cluster name = $CLUSTERNAME; #-- # admin conninfo's are used by slonik to connect to the nodes one for each # node on each side of the cluster, the syntax is that of PQconnectdb in # the C-API # -- node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER'; node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST user=$REPLICATIONUSER'; #-- # init the first node. Its id MUST be 1. This creates the schema # _$CLUSTERNAME containing all replication system specific database # objects. #-- init cluster ( id=1, comment = 'Master Node'); #-- # Because the history table does not have a primary key or other unique # constraint that could be used to identify a row, we need to add one. # The following command adds a bigint column named # _Slony-I_$CLUSTERNAME_rowID to the table. It will have a default value # of nextval('_$CLUSTERNAME.s1_rowid_seq'), and have UNIQUE and NOT NULL # constraints applied. All existing rows will be initialized with a # number #-- table add key (node id = 1, fully qualified name = 'public.history'); #-- # Slony-I organizes tables into sets. The smallest unit a node can # subscribe is a set. The following commands create one set containing # all 4 pgbench tables. The master or origin of the set is node 1. #-- create set (id=1, origin=1, comment='All pgbench tables'); set add table (set id=1, origin=1, id=1, fully qualified name = ' public.accounts', comment='accounts table'); set add table (set id=1, origin=1, id=2, fully qualified name = ' public.branches', comment='branches table'); set add table (set id=1, origin=1, id=3, fully qualified name = ' public.tellers', comment='tellers table'); set add table (set id=1, origin=1, id=4, fully qualified name = ' public.history', comment='history table', key = serial); #-- # Create the second node (the slave) tell the 2 nodes how to connect to # each other and how they should listen for events. #-- store node (id=2, comment = 'Slave node'); store path (server = 1, client = 2, conninfo='dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER'); store path (server = 2, client = 1, conninfo='dbname=$SLAVEDBNAME host=$SLAVEHOST user=$REPLICATIONUSER'); store listen (origin=1, provider = 1, receiver =2); store listen (origin=2, provider = 2, receiver =1); _EOF_ On 3/6/06, Christopher Browne <cbbrowne at ca.afilias.info> wrote: > > john joe wrote: > > > bash-3.00$ slonik <<_EOF_ > > > try { > > > echo 'test'; > > > } > > > on error { > > > echo 'fail'; > > > } > > > _EOF_ > > <stdin>:1: ERROR: syntax error at or near try > > > > It seems like whatever i try running with slonik has a syntax error on > > the first line of the script . > > Im using FC4 with following packages. > > > > postgresql-libs-8.0.6-1PGDG > > postgresql-devel-8.0.6-1PGDG > > postgresql-8.0.5-1PGDG > > postgresql-slony1-engine-1.1.5-1_PG8.1.2 > > postgresql-server-8.0.5-1PGDG > > > > Can anyone help me ? > > Thanks in advance. > > Sujin Philip > > Every slonik script must begin with a "preamble" that does two things: > > 1. Names the cluster > 2. Defines paths to let slonik know how to talk to the nodes in the > cluster > > http://linuxfinances.info/info/hdrcmds.html > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://gborg.postgresql.org/pipermail/slony1-general/attachments/20060307/cead8938/attachment-0001.html
- Previous message: [Slony1-general] SLONIK syntax error (help needed)
- Next message: [Slony1-general] SLONIK syntax error (help needed)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list