Re: transaction and triggers

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: transaction and triggers
Дата
Msg-id 20080118152625.GE5326@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: transaction and triggers  (Gerardo Herzig <gherzig@fmed.uba.ar>)
Ответы Re: transaction and triggers  (Gerardo Herzig <gherzig@fmed.uba.ar>)
Список pgsql-sql
Gerardo Herzig escribió:

> Right.  But  today, that trigger do some other work, wich includes writing 
> some files to disk, so there is my problem. Crap, i guess i will have to 
> review the main logic.

Probably it's better to move the actual file writing to a listener
external process -- the transaction only does a NOTIFY, which is certain
to be delivered only when the transaction commits.  So if it aborts, no
spurious write occurs.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Gerardo Herzig
Дата:
Сообщение: Re: transaction and triggers
Следующее
От: Gerardo Herzig
Дата:
Сообщение: Re: transaction and triggers