Christopher Browne cbbrowne
Thu Jun 29 11:13:48 PDT 2006
cbbrowne at ca.afilias.info wrote:
> Another thought...
>
> When execute script runs, it restores triggers on all tables.
>
> Perhaps some replicated table has 2 instances of a trigger: one hidden,
> and one live.  When th event tries to restore triggers, it finds a
> conflict.
>
> Try querying on pg_trigger bytrigger name where count > 1.
>
> You may have to drop the "visible" trigger on that subscriber so it can
> retrieve the hidden one.
>
>   
There are two further implications to this...

1.  That you were experiencing the problem when adding a trigger is a
distraction.  You would experience the same problem with ANY request to
EXECUTE SCRIPT, regardless of its contents.

2.  The question becomes:  How did an extra trigger get into place?

We have seen this in some systems; we have cache invalidation triggers
that we want to have run on one subscriber. 

The "hacky" way is to add it back by hand.  Unfortunately, that means
there are two copies of the trigger; one "live" (the one added by hand)
and the "hidden" original one (which Slony-I hides by pointing it to the
PK index).  Any time we run EXECUTE SCRIPT, we have to drop out the
added-by-hand trigger, by hand, otherwise the EXECUTE SCRIPT event will
fail, with exactly the errors you have been seeing.

The "right" way is to use STORE TRIGGER...



More information about the Slony1-general mailing list