Re: Triggers and scalability in high transaction tables.

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Triggers and scalability in high transaction tables.
Date: 2015-02-26 22:17:36
Message-ID: 54EF9B80.9050602@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2015-02-26 22:23:35 Re: ANALYZE after CREATE TABLE AS SELECT...
Previous Message Jerry Sievers 2015-02-26 22:12:33 Re: Triggers and scalability in high transaction tables.