Re: Background triggers?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Background triggers?
Дата
Msg-id 27827.1250711134@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Background triggers?  (Dick Visser <visser@terena.org>)
Список pgsql-admin
Dick Visser <visser@terena.org> writes:
> Ideally I would like the trigger to fire and then do the actual work in
> the background, but I found no way of doing this.

> So I came to NOTIFY/LISTEN. But because there a several pieces of
> software talking to the database, this is not ideal either.

Well, the traditional solution is to have a trigger or rule that fires
the NOTIFY.  You don't need any cooperation from the client apps.

> Is there a way to trigger stuff using NOTIFY/LISTEN, but WITHOUT an
> external client doing the magic?

No.  You need a dedicated client process that just sits there waiting
for notifies.  (Well, it might be able to do some other useful work
too, but the simplest way is to dedicate a connection for this.)

            regards, tom lane

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

Предыдущее
От: Dick Visser
Дата:
Сообщение: Background triggers?
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Background triggers?