Re: asynchrous triggers

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Enrico Weigelt <weigelt(at)metux(dot)de>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: asynchrous triggers
Date: 2005-04-01 04:07:41
Message-ID: 20050401040741.GA9898@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Apr 01, 2005 at 05:52:49AM +0200, Enrico Weigelt wrote:

> is it possible somehow to make (AFTER) triggers run in their
> own process/thread, so the calling session can return immediately
> and the trigger runs in background ?

Not really, though you could signal an external process to do something
asynchronously using LISTEN/NOTIFY.

That is, unless you write your trigger function in C and it calls
fork(). Not sure if that would actually work though (and you should
forget about accessing the database.)

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"Estoy de acuerdo contigo en que la verdad absoluta no existe...
El problema es que la mentira sí existe y tu estás mintiendo" (G. Lama)

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Gary Stainburn 2005-04-01 11:36:00 gone blind - can't see syntax error
Previous Message Enrico Weigelt 2005-04-01 03:52:49 asynchrous triggers