cbbrowne at ca.afilias.info cbbrowne
Wed Apr 5 19:42:19 PDT 2006
> 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...




More information about the Slony1-general mailing list