Re: Asynchronous Trigger?

Поиск
Список
Период
Сортировка
От Michael Loftis
Тема Re: Asynchronous Trigger?
Дата
Msg-id CAHDg04sckCAWdVbepAkYrFzjV8ukORCCTqXzpim2hSWXaUw9QA@mail.gmail.com
обсуждение исходный текст
Ответ на Asynchronous Trigger?  (Cory Tucker <cory.tucker@gmail.com>)
Ответы Re: Asynchronous Trigger?  (Adam Tauno Williams <awilliam@whitemice.org>)
Список pgsql-general
As suggested, note in ToDo table, also maybe look at LISTEN and NOTIFY
and have a job runner process LISTENing (and cleaning up the queue,
or, marking an item as in progress if you've multiple workers)  The
work queue table is to help maintain state...if noone is LISTENing
then the table acts as backup so when a worker fires up it can start
working on whatever's already there and empty that.

On Fri, Apr 27, 2018 at 4:46 AM, Olleg Samoylov <splarv@ya.ru> wrote:
> Try to look at PGQ from SkyTools.
>
> On 2018-03-30 01:29, Cory Tucker wrote:
>
> Is it possible to have the execution of a trigger (or any function) not
> block the completion of the statement they are associated with?
>
> A pattern I had hoped to implement was to do a quick update of rows that
> signaled they needed attention, and then an async per-row trigger would come
> and do the maintenance (in this case, make an expensive materialized view).
>
> Any suggestions welcome.
>
> thanks!
> --Cory
>
>



-- 

"Genius might be described as a supreme capacity for getting its possessors
into trouble of all kinds."
-- Samuel Butler


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

Предыдущее
От: Fabio Ugo Venchiarutti
Дата:
Сообщение: Re: Can PostgreSQL create new WAL files instead of reusing old ones?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Can PostgreSQL create new WAL files instead of reusing old ones?