Re: Disable Triggers

From: Geoffrey <lists(at)serioustechnology(dot)com>
To: Terry Lee Tucker <terry(at)turbocorp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Disable Triggers
Date: 2008-04-09 19:59:16
Message-ID: 47FD2014.5060108@serioustechnology.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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)

Me thinks you forgot to mention that you are working on implementing
this on Postgresql 8.3.1.

--
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
- Benjamin Franklin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-04-09 20:38:54 Re: Disable Triggers
Previous Message Francisco Figueiredo Jr. 2008-04-09 19:23:55 Re: connecting VB to postgreSQL