Re: disabling triggers - Mailing list pgsql-sql

From chester c young
Subject Re: disabling triggers
Date
Msg-id 20030901203530.67332.qmail@web12705.mail.yahoo.com
Whole thread Raw
In response to Re: disabling triggers  (weigelt@metux.de)
List pgsql-sql
--- weigelt@metux.de wrote:
> On Tue, Jun 17, 2003 at 11:49:44AM -0700, Josh Berkus wrote:
> 
> <big_snip>
> 
> I also need something like that for my replication stuff:
> 
> When data from another node comes it, it should be written 
> directly to the tables, without any (unwanted) triggers firering.
> 
> On the other hand, in "normal" mode, also some missing fields
> should be filled on create or update.
> 

I have done this three ways:

1. have all client DML go through views and at the view level do all
checking etc.
+ very robust, very secure
- lots of work

2. have replication updates use the "replicate" user - in triggers, do
nothing if user is replicate, otherwise work as normal
+ very easy to do
- triggers fire always, even when doing nothing

3. have replicate triggers write data file for import directly into the
postgresql engine
+ transactions smaller, less rollback
+ can replicate to different databases, over net, etc
- lots of work (although easy to write trigger generator)
- difficult failure senarios


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


pgsql-sql by date:

Previous
From: weigelt@metux.de
Date:
Subject: Trigger functions w/o pgsql ?
Next
From: Peter Eisentraut
Date:
Subject: Re: Trigger functions w/o pgsql ?