Re: disabling triggers

Поиск
Список
Период
Сортировка
От chester c young
Тема Re: disabling triggers
Дата
Msg-id 20030901203530.67332.qmail@web12705.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: disabling triggers  (weigelt@metux.de)
Список 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 по дате отправления:

Предыдущее
От: weigelt@metux.de
Дата:
Сообщение: Trigger functions w/o pgsql ?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Trigger functions w/o pgsql ?