[Spce-user] TIPP: database replication with tungsten

Klaus Peter v. Friedeburg friedeburg at aco.de
Sat Oct 13 20:34:05 EDT 2012


Hi all,

if you want to use tungsten replicator for replicate the database in multi-master Setup you must edit the table-triggers.

Insert a new function to all the databases:
**************************************
create function is_master()
    returns boolean
    deterministic
    return if(substring_index(user(),'@',1) != 'replicator',true, false);
**************************************

In the trigger definition insert AFTER the DECLARE lines
**************
  if is_master() then
       ........
  end if;
**************



Klaus Peter


More information about the Spce-user mailing list