Miguel mmiranda
Wed Apr 5 20:10:05 PDT 2006
cbbrowne at ca.afilias.info wrote:

>>hi , i have many triggers in accounting tables that modifies varius
>>columns in other diferent tables, what will happend with this triggers
>>in the slave database, i. .e: when i insert data in traffic table in
>>master db, the trigger in traffic table makes some calculations and
>>updates h323-credit-amount column in users table, slony will replicate
>>this insert and update, so far so good.
>>_but_ in the slave db the trigger will be fired again, isnt it?, if so,
>>the trigger will  do calculations for the same inserted row  and it will
>>update  the h323-credit-amount column again?
>>i hope not...
>>    
>>
>
>"Not" is normally the case.
>
>Triggers are deactivated on subscriber nodes.  That will cover your case,
>as well as foreign key triggers which, once satisfied on the origin, do
>not need to be verified again.
>
>If you need triggers to run on subscriber nodes, there is a STORE TRIGGER
>command in Slonik to allow that...
>  
>
    It will cover my case, yes, i dont need triggers on subscribers, i
    just wanted to be sure nothing "strange" could happen to my
    customers' credit-amount, but its good to know what to do if i want
    to,  great work,

thanks
---
Miguel

>
>  
>




More information about the Slony1-general mailing list