Martijn van Oosterhout kleptog at gmail.com
Sun Jun 26 03:07:06 PDT 2011
On 25 June 2011 19:43, Aleksey Tsalolikhin <atsaloli.tech at gmail.com> wrote:
> Hi.  I've been using Slony for a couple of years, and it's been working great;
> but we've just started using triggers in our application, and when I manually
> added the trigger on the subscriber side, next time I tried to recreate the
> data set, it wouldn't go due to multiple triggers issue.  So how do I replicate
> triggers, please?

Not sure exactly what you ran into, but I've never used Slony to
replicate DDL. It's also a bit weird that the name of the trigger
didn't get filled in. I usually define the triggers in the schema
before starting the replication.

One thing to realise is that by default triggers are not fired on
slaves. This is usually what you want, but if you're using triggers to
fire off some external process that you also want to happen on the
slave, you can use ALTER TABLE foo ENABLE ALWAYS TRIGGER bar;


> This is the issue I ran into after manually adding the trigger on the
> subscriber:

What do you mean by "manually added"? Unless you used slony, I don't
see how slony could complain?

Have a nice day,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/


More information about the Slony1-general mailing list