Re: Asynchronous Trigger?

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Cory Tucker <cory(dot)tucker(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Asynchronous Trigger?
Date: 2018-04-27 15:59:11
Message-ID: CAHyXU0wHfetV7eMBWEtbM=wFZcARUkbq8Q9kV1PcX09oVPjk2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 29, 2018 at 5:29 PM, Cory Tucker <cory(dot)tucker(at)gmail(dot)com> 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.

Generally the idea is to (in the trigger) invoke some low risk quick
action such as inserting a record in to a 'stuff to do' table. Then,
some other process comes around and does the heavy lifting.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Basques, Bob (CI-StPaul) 2018-04-27 16:13:32 Re: Rationale for aversion to the central database?
Previous Message Guyren Howe 2018-04-27 15:46:33 Re: Rationale for aversion to the central database?