Re: Trigger that spawns forked process

Поиск
Список
Период
Сортировка
От Christopher Murtagh
Тема Re: Trigger that spawns forked process
Дата
Msg-id 1115687550.4795.10.camel@mafalda.corporateunderground.org
обсуждение исходный текст
Ответ на Re: Trigger that spawns forked process  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Trigger that spawns forked process
Список pgsql-general
On Mon, 2005-05-09 at 17:07 -0400, Tom Lane wrote:
> Douglas McNaught <doug@mcnaught.org> writes:
> > Why not have a client connection LISTENing and doing the
> > synchronization, and have the trigger use NOTIFY?
> > Or, you could have the trigger write to a table, and have another
> > client periodically scanning the table for new sync events.
> > Either one of those would be simpler and more robust than fork()ing
> > inside the backend.
>
> ... not to mention it would avoid the risk of propagating
> not-yet-committed changes.

 How's that? If I can notify a daemon that the change is committed, then
why couldn't I write a forking plperl function that executes when the
transaction is done? How is one riskier than the other? Is there
something obvious I'm missing here?

Cheers,

Chris


--
Christopher Murtagh
Enterprise Systems Administrator
ISR / Web Service Group
McGill University
Montreal, Quebec
Canada

Tel.: (514) 398-3122
Fax:  (514) 398-2017


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

Предыдущее
От: Christopher Murtagh
Дата:
Сообщение: Re: Trigger that spawns forked process
Следующее
От: Douglas McNaught
Дата:
Сообщение: Re: Trigger that spawns forked process