Search Postgresql Archives

Re: Disable Triggers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 21, 2008 at 12:49:48PM -0500, Terry Lee Tucker wrote:
> 
> Thanks for the input. I've been using the reltriggers in pg_class for a long 
> time and it does work; however,  I did notice in the documentation on 
> pg_trigger that tgenabled is not checked properly and using that will give 
> inconsistant results. We have several valid reasons for disabling all 
> triggers that I won't elaborate here.

I'm not arguing that you have those valid reasons.  I'm just warning you
that your success so far with this strategy does not guarantee future
results.
 
> Unless I get a better idea, I'm going to change the disable_triggers function 
> to duplicate all the records in pg_trigger belonging to a given table, delete 
> the records except for the Slony trigger, update pg_class setting reltriggers 
> to 1, do the work, and then restore everything with a call to 
> enable_triggers. Does this sound reasonable to you?

I expect you're going to have to get everyone to disconnect after that,
because the triggers oids will all have changed and you'll get errors to
that effect.  Also, are there these triggers on the slony replicas?  You
really need to be doing DROP TRIGGER/STORE TRIGGER operations if so. 
Otherwise, very surprising things may happen.

A


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux