Re: Behaviour of triggers on replicated and non replicated tables

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Behaviour of triggers on replicated and non replicated tables
Дата
Msg-id BANLkTinEwmsA7nK6Uet-fnpWg37VfA+6PA@mail.gmail.com
обсуждение исходный текст
Ответ на Behaviour of triggers on replicated and non replicated tables  ("Luiz K. Matsumura" <luiz@planit.com.br>)
Ответы Re: Behaviour of triggers on replicated and non replicated tables  ("Luiz K. Matsumura" <luiz@planit.com.br>)
Список pgsql-bugs
2011/6/10 Luiz K. Matsumura <luiz@planit.com.br>:
> I need help to know if the follow scenario is a expected behaviour, a bug=
 of
> postgres or a bug of slony:
>
> Postgres v8.4.8
> Slony-I v 2.0.5
>
> I have table replicated with slony and that do some updates in another ta=
ble
> not replicated.
>
> The trigger on replicated table was enabled on the slave database with the
> command:
>
> ALTER TABLE table1 ENABLE ALLWAYS TRIGGER trigger1;
>
> And this trigger is working fine as expected.
>
> The strange behaviour is that trigger do a update in another table not
> replicated, let=B4s say table2, and
> the triggers of this table is not fired.
> A unexpected behaviour IMHO, if I do
>
> ALTER TABLE table2 ENABLE ALWAYS TRIGGER trigger2;
>
> Then the trigger2 is fired now when trigger1 do a update in table2.
>
> My doubt is: since table2 is not replicated why they triggers dont fire e=
ven
> by a update command in
> a trigger of a replicated table ?

I'm confused.  If you enable the trigger on table2, it's going to fire
when someone updates table2.  Whether or not the update is coming from
another trigger or directly from the user has nothing to do with it.

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Josip Rodin
Дата:
Сообщение: Re: BUG #6020: Wrong data type returned after CAST in FROM
Следующее
От: Robert Haas
Дата:
Сообщение: Re: BUG #6054: Insert to table, which has fkey to table,which is parenttable for another table - error