Re: disabling triggers

From: chester c young <chestercyoung(at)yahoo(dot)com>
To: weigelt(at)metux(dot)de, pgsql-sql(at)postgresql(dot)org
Subject: Re: disabling triggers
Date: 2003-09-01 20:35:30
Message-ID: 20030901203530.67332.qmail@web12705.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- weigelt(at)metux(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Glenn 2003-09-01 20:46:34 running aggregates
Previous Message weigelt 2003-09-01 18:10:12 Trigger functions w/o pgsql ?