Forum frum at ar-sd.net
Fri Mar 30 06:02:32 PDT 2007
Hi, 

I do the schema change with "execute script()", maybe I have something
misconfigured. 

I tried with this example:

REPLICATION 1: DB a to DB b

cluster name=replic_loco1;
NODE 1 ADMIN CONNINFO = 'dbname=a host=127.0.0.1 user=slony port=5432'; NODE
2 ADMIN CONNINFO = 'dbname=b host=127.0.0.1 user=slony port=5432';

init cluster (id=1, comment='replic_loco Master Node'); store node (id=2,
comment='replic_loco Subscriber Node 1');

STORE PATH (SERVER=1, CLIENT=2, CONNINFO='dbname=a host=127.0.0.1 user=slony
port=5432'); STORE PATH (SERVER=2, CLIENT=1, CONNINFO='dbname=b
host=127.0.0.1 user=slony port=5432');

create set (id=11, origin=1, comment='replic_loco Tables and Sequences');
set add table (id=1, set id=11, origin=1, fully qualified name='public.t1',
comment='replic_loco table public.t1');

subscribe set (id=11, provider=1, receiver=2, forward=yes);

And replication 2: DB b to DB c

cluster name=replic_loco2;
NODE 1 ADMIN CONNINFO = 'dbname=b host=127.0.0.1 user=slony port=5432'; NODE
2 ADMIN CONNINFO = 'dbname=c host=127.0.0.1 user=slony port=5432';

init cluster (id=1, comment='replic_loco Master Node'); store node (id=2,
comment='replic_loco Subscriber Node 1');

STORE PATH (SERVER=1, CLIENT=2, CONNINFO='dbname=b host=127.0.0.1 user=slony
port=5432'); STORE PATH (SERVER=2, CLIENT=1, CONNINFO='dbname=c
host=127.0.0.1 user=slony port=5432');

create set (id=21, origin=1, comment='replic_loco Tables and Sequences');
set add table (id=1, set id=21, origin=1, fully qualified name='public.t1',
comment='replic_loco table public.t1');

subscribe set (id=21, provider=1, receiver=2, forward=yes);



If I change the schema of a, the replication from b to c is stopped. From a
to b works well. 

The "execute script()" does not reach the C table....

I have a feeling that I misconfigured something...............


Regards,
Andy. 

> -----Original Message-----
> From: Thomas Pundt [mailto:mlists at rp-online.de] 
> Sent: Friday, March 30, 2007 3:38 PM
> To: slony1-general at lists.slony.info; Forum
> Subject: Re: [Slony1-general] Database Schema Changes (DDL) 
> not working on third node
> 
> Hi,
> 
> On Friday 30 March 2007 13:38, Forum wrote:
> | I have the following scenario:
> | DB1 -> is replicated to DB2 - set called replic_back - one server
> | DB2 -> is replicated ahead to DB3 - set called replic_loco. 
> - second 
> | server
> |
> | Db2 and db3 are on the same machine(second server).
> |
> | Every time I make a schema change(alter table etc etc) in 
> DB1 which is 
> | successfully done in DB2 the replication replic_loco stops to work. 
> | The schema change does not reach DB3. In the logs I didn't find 
> | anything suspicios. If I make to replic_loco a unsubscribe and 
> | subscribe the data's are actually refreshed, but the 
> replication still does not work.
> 
> you _have to_ make DDL changes using the slonik command 
> "execute script()"
> (see slony documentation for details) - otherwise the 
> replication most definitely breaks (as you've discovered), 
> because the Slony trigger signatures don't match your table 
> layout anymore.
> 
> Schema changes can't be automatically distributed because you 
> can't put triggers on catalog tables (which would be necessary).
> 
> Ciao,
> Thomas
> 
> --
> Thomas Pundt <thomas.pundt at rp-online.de> ---- 
> http://rp-online.de/ ----
> 
> 



More information about the Slony1-general mailing list