Glyn Astill glynastill at yahoo.co.uk
Thu Dec 20 06:55:14 PST 2007
I used pgAdmin to set up my sets, so I guess I'm missing the
intricate detail here.

However in pgAdmin to add another table to a replication set I have
to create a new set, subscribe the slaves and then merge the sets.

I presume you have to go through the same new set -> merge sets
process.

Glyn
--- Josh Harrison <joshques at gmail.com> wrote:

> Hi
> I already have a set replicating properly   . This is the  script I
> used for
> initializing the first cluster
>         cluster name =slony_example;
>         node 1 admin conninfo = 'dbname=$MASTERDBNAME
> host=$MASTERHOST
> user=$REPLICATIONUSER';
>         node 2 admin conninfo = 'dbname=$SLAVEDBNAME
> host=$SLAVEHOST
> user=$REPLICATIONUSER';
>         init cluster ( id=1, comment = 'Master Node');
>         create set (id=1, origin=1, comment='All rmrs tables');
>         set add table (set id=1, origin=1, id=2, fully qualified
> name = '
> public.a_method', comment='a_method table');
>          .....
>         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');
> 
>    Now I want to add 2 tables dummy1 and dummy2 to the cluster. I
> had
> created the tables using 'execute script' and the tables now exist
> in the
> master and slave node. Now to add these 2 tables to the replication
> set I
> try to run this script
>         cluster name =slony_example;
>         node 1 admin conninfo = 'dbname=$MASTERDBNAME
> host=$MASTERHOST
> user=$REPLICATIONUSER';
>         node 2 admin conninfo = 'dbname=$SLAVEDBNAME
> host=$SLAVEHOST
> user=$REPLICATIONUSER';
>         create set (id=45, origin=1, comment='All rmrs tables');
>         set add table (set id=45, origin=1, id=46, fully qualified
> name = '
> public.dummy1', comment='dummy1 table');
>        set add table (set id=45, origin=1, id=47, fully qualified
> name = '
> public.dummy2', comment='dummy2 table');
>        subscribe set(id=45, provider=1,receiver=2,forward=no);
>        merge set(id=1,add id=45, origin=1);
> 
> But I get this error. What am I doing wrong here?
> 
> <stdin>:36: PGRES_FATAL_ERROR select "_slony_example".storeSet(45,
> 'All
> example tables');  - ERROR:  duplicate key violates unique
> constraint
> "sl_set-pkey"
> CONTEXT:  PL/pgSQL function "storeset" line 13 at SQL statement
> 
> Thanks
> josh
> > _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
> 



      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com



More information about the Slony1-general mailing list