lio bod liobod.slony at gmail.com
Thu Mar 6 02:55:12 PST 2008
I go on : my generated create_set.slonik has always the same id for
sequences :

[.../...]
set add sequence (id=3D1, set id=3D1, origin=3D1, fully qualified name=3D'
public.mysequence1', comment=3D'mycluster sequence public.mysequence1');
set add sequence (id=3D1, set id=3D1, origin=3D1, fully qualified name=3D'
public.mysequence2', comment=3D'mycluster sequence public.mysequence2');
[.../...]

and it's badly appreciate by slonik :

$> slonik create_set.slonik
slonik create_set.slonik :3: PGRES_FATAL_ERROR select
"_mycluster".setAddSequence(1, 1, 'public.mysequence2', 'mycluster sequence
public.mysequence2');  - ERREUR:  Slony-I: setAddSequence_int(): sequence ID
1 has already been assigned
CONTEXT:  PL/pgSQL function "setaddsequence" line 36 at perform


For info, i run slony from a rpm
http://yum.pgsqlrpms.org/7.4/redhat/rhel-4-i386/slony1-1.2.12-2.rhel4.i686.=
rpm
And i can't really afford to be update from slony CVS, so may be things are
already fixed.

May the Force be with you, **


2008/3/6, lio bod <liobod.slony at gmail.com>:
>
> Thx for the fix.
>
> I havn't test the last HEAD release yet. I 'm afraid i won' t have any
> time for this by now.
> The generated *.slonik files helps me as sample that i modify with my
> little hands...
>
> Btw, the store_paths.slonik file looks weird :
>
> STORE PATH (SERVER=3D1, CLIENT=3D2, CONNINFO=3D'dbname=3Dmydb host=3Dmyho=
st1
> user=3Dpgslony port=3D5432'); else
> STORE PATH (SERVER=3D1, CLIENT=3D2, CONNINFO=3D'dbname=3Dmydb host=3Dmyho=
st2
> user=3Dpgslony port=3D5432');
> STORE PATH (SERVER=3D2, CLIENT=3D1, CONNINFO=3D'dbname=3Dmydb host=3Dmyho=
st2
> user=3Dpgslony port=3D5432'); else
> STORE PATH (SERVER=3D2, CLIENT=3D1, CONNINFO=3D'dbname=3Dmydb host=3Dmyho=
st2
> user=3Dpgslony port=3D5432');
>
> and i'm not really estonished by error produced :
>
> $> slonik store_paths.slonik
> store_paths.slonik:2: ERROR: syntax error at or near else
>
> another bug or wrong use?
>
>
> I go on on with with some idea of improvement even if i guess they are so
> obvious that they might already be in your roadmap :
> - why not separate files among thiner functionnality : 1 file *.slonik
> file for creating cluster, another for nodes, another for set, another for
> tables, another for sequences , ..., what else?, and subscription
> - why not produces undo *.slonik files (with same granularity) : remove
> subscription, ..., untill remove cluster (even i still not sure of my self
> how to make so with bare metal).
>
> With full respect due slony people work (I do know time is nerve war),
>
> rgds
>
>
> 2008/3/5, Christopher Browne <cbbrowne at ca.afilias.info>:
> >
> > "St=E9phane A. Schildknecht" <stephane.schildknecht at postgresqlfr.org>
> > writes:
> > > lio bod a =E9crit :
> > >> Hello world,
> > >>
> > >> Still having fun with supplied shell scripts :
> > >>
> > >> After setting env variales, i made work configure-replication.sh
> > >>
> > >>>/tmp/slonytest-temp.Q17311/create_set.slonik
> > >>>/tmp/slonytest-temp.Q17311/create_set.slonik:29: ERROR: syntax error
> > at
> > >> or near snum
> > >>
> > >> The file create_set.slonik looks like that :
> > >>
> > >> [.../...]
> > >> set add table (id=3D2, set id=3D1, origin=3D1, fully qualified
> > >> name=3D'public.mytable1', comment=3D'mycluster table public.mytable1=
');
> > >> set add sequence (id=3D1, set id=3D1, origin=3D1, fully qualified
> > >> name=3D'public.mysequence1', comment=3D'mycluster sequence
> > >> public.mysequence1'); snum=3D2
> > >> [.../...]
> > >>
> > >> Where does the 'snum=3D2' comes from?
> > >
> > > It's a bug in the script. A carriage return has disappeared on line
> > 150.
> > >
> > > You should have
> > >
> > > 150c150,151
> > > <     echo "set add sequence (id=3D${snum}, set id=3D1, origin=3D1, f=
ully
> > qualified
> > > name=3D'${seq}', comment=3D'${CLUSTER} sequence ${seq}');" >> $SETUPS=
ET
> > > snum=3D`expr ${snum} + 1`
> > > ---
> > >>     echo "set add sequence (id=3D${snum}, set id=3D1, origin=3D1, fu=
lly
> > qualified
> > > name=3D'${seq}', comment=3D'${CLUSTER} sequence ${seq}');" >> $SETUPS=
ET
> > >>     snum=3D`expr ${snum} + 1`
> >
> > Fixed in REL_1_2_STABLE; it's evidently fine in CVS HEAD...
> > --
> > select 'cbbrowne' || '@' || 'ca.afilias.info';
> > <http://dba2.int.libertyrms.com/>
> > Christopher Browne
> > (416) 673-4124 (land)
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20080306/=
74c8a7d5/attachment-0001.htm


More information about the Slony1-general mailing list