Re: Triggers and scalability in high transaction tables. - Mailing list pgsql-general

From John R Pierce
Subject Re: Triggers and scalability in high transaction tables.
Date
Msg-id 54EF9B80.9050602@hogranch.com
Whole thread Raw
In response to Re: Triggers and scalability in high transaction tables.  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
On 2/26/2015 2:03 PM, Merlin Moncure wrote:
> I would strongly advise you not to put complex processing in triggers
> if at all possible.  Instead have the insert operation write a record
> into another table which forms a queue of work to do.  That queue can
> then be walked by another process which accumulates the work and takes
> appropriate action (and, since you are out of the context of the
> operation at hand, can be threaded etc).

I 2nd this emotion...  that's exactly what we do with our complex
background processing.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



pgsql-general by date:

Previous
From: "Semyon Reyfman"
Date:
Subject: ANALYZE after CREATE TABLE AS SELECT...
Next
From: Alvaro Herrera
Date:
Subject: Re: ANALYZE after CREATE TABLE AS SELECT...