Re: Disable Triggers - Mailing list pgsql-general

From Terry Lee Tucker
Subject Re: Disable Triggers
Date
Msg-id 200802211328.29802.terry@turbocorp.com
Whole thread Raw
In response to Re: Disable Triggers  (Andrew Sullivan <ajs@crankycanuck.ca>)
Responses Re: Disable Triggers
List pgsql-general
On Thursday 21 February 2008 13:05, Andrew Sullivan wrote:
>
>
> > 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.
>
Gee, I hadn't thought about that. Back to the drawing board...
Thanks for the help.

--
Terry Lee Tucker
Turbo's IT Manager
Turbo, division of Ozburn-Hessey Logistics
2251 Jesse Jewell Pkwy NE
Gainesville, GA 30501
Tel: (336) 372-6812  Fax: (336) 372-6812  Cell: (336) 404-6987
terry@turbocorp.com
www.turbocorp.com

pgsql-general by date:

Previous
From: Julio Cesar Leiva
Date:
Subject: Re: PostgreSQL 8.3.0 RPMs are available for download
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Disable Triggers