Jan Wieck JanWieck
Mon Jul 12 04:16:47 PDT 2004
On 7/11/2004 11:14 PM, Philip Warner wrote:

> I just installed slony-I and it looks excellent, but I am concerned about 
> existing application triggers. Do I need to be wary of trigger order (eg. 
> make sure slony triggers run last)? I have application triggers that 
> sometimes modify NEW, and others that just update other tables. I am 
> obviously most worried about the former, especially if I DROP/CREATE the 
> functions rather than replace them. Or add new functions.

No. Slony does add an AFTER trigger on the origin (master) which records 
the row changes. Since AFTER triggers cannot modify or suppress any 
more, their order of execution is not important here.

On the subscriber side (slaves) all user triggers, constraint triggers 
and rules get disabled (in a very ugly fashion, their tgrelid is 
replaced with the oid of the PK index of the table ... ahem) and another 
trigger is placed on the tables which simply errors out if a user 
application tries to update the replicated table by accident.

With the slonik command "store trigger" you can tell slony not to 
disable a trigger on the subscriber side.


Jan

> 
> Comments/suggestions would be appreciated.
> 
> 
> ----------------------------------------------------------------
> Philip Warner                    |     __---_____
> Albatross Consulting Pty. Ltd.   |----/       -  \
> (A.B.N. 75 008 659 498)          |          /(@)   ______---_
> Tel: (+61) 0500 83 82 81         |                 _________  \
> Fax: (+61) 03 5330 3172          |                 ___________ |
> Http://www.rhyme.com.au          |                /           \|
>                                   |    --________--
> PGP key available upon request,  |  /
> and from pgp.mit.edu:11371       |/ 
> 
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/slony1-general


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #



More information about the Slony1-general mailing list