Re: pre-commit triggers

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: pre-commit triggers
Дата
Msg-id 528880BE.6070508@2ndQuadrant.com
обсуждение исходный текст
Ответ на Re: pre-commit triggers  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pre-commit triggers  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: pre-commit triggers  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On 11/17/2013 01:42 AM, Tom Lane wrote:
> Hannu Krosing <hannu@2ndQuadrant.com> writes:
>> I have not looked at the patch, but does it also run pre-rollback ?
> error in trigger -> instant infinite loop.
Means this needs to have some kind of recursion depth limit, like python

>>> def x():
...     return x()
...
>>> x()
... (a few thousand messages like the following) ... File "<stdin>", line 2, in x
RuntimeError: maximum recursion depth exceeded

>
> Besides, exactly what would you do in such a trigger?  
The use case would be telling another system about the rollback.

Basically sending a "ignore what I told you to do" message

So it would send a network message, a signal or writing something to
external file.

> Not modify
> the database, for certain, because we're about to roll back.
>
>             regards, tom lane

Cheers

-- 
Hannu Krosing
PostgreSQL Consultant
Performance, Scalability and High Availability
2ndQuadrant Nordic OÜ




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

Предыдущее
От: Sawada Masahiko
Дата:
Сообщение: Re: Logging WAL when updating hintbit
Следующее
От: Ian Lawrence Barwick
Дата:
Сообщение: Review: pset autocomplete add missing options