From: chester c young <chestercyoung@yahoo.com>
To: weigelt@metux.de
To: pgsql-sql@postgresql.org
Subject: Re: disabling triggers
Date: Mon, 1 Sep 2003 13:35:30 -0700 (PDT)
Message-ID: <20030901203530.67332.qmail@web12705.mail.yahoo.com> (raw)
In-Reply-To: <20030901175704.GA12947@metux.de>
--- 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: chestercyoung@yahoo.com, weigelt@metux.de
Subject: Re: disabling triggers
In-Reply-To: <20030901203530.67332.qmail@web12705.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox