Re: Disable Triggers - Mailing list pgsql-general

From A.M.
Subject Re: Disable Triggers
Date
Msg-id 9725AE48-6765-4B39-A4BB-849E7D3B6E49@themactionfaction.com
Whole thread Raw
In response to Disable Triggers  (Terry Lee Tucker <terry@turbocorp.com>)
Responses Re: Disable Triggers
List pgsql-general
On Feb 21, 2008, at 10:20 AM, Terry Lee Tucker wrote:

> Greetings:
>
> We have been working diligently toward integrating Slony into our
> production
> databases. We've been having trouble with various tables, although
> being
> replicated perfectly in the initial replication stage, afterwards,
> getting
> out of sync.
>
> I have finally figured out what the problem is. We have a Perl
> process that
> continually updates certain columns across all databases. That Perl
> process
> calls a function we have written called disable_triggers which updates
> pg_class, setting reltriggers to 0 for the given table, and then
> later, after
> the work is complete, resetting reltriggers to the original value.
> Unfortunately, during this process, the Slony trigger is disabled
> as well
> which is causing our problem.
>
> My questions is this: how would I go about changing my function so
> that all
> the triggers EXCEPT the Slony trigger would be disabled? Any ideas?
>
> Version:
> PostgreSQL 7.4.19 on i686-redhat-linux-gnu, compiled by GCC gcc
> (GCC) 3.4.6
> 20060404 (Red Hat 3.4.6-9)

Couldn't your triggers check some flag to determine if they should
continue?

Cheers,
M

pgsql-general by date:

Previous
From: Terry Lee Tucker
Date:
Subject: Disable Triggers
Next
From: Terry Lee Tucker
Date:
Subject: Re: Disable Triggers