pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
asynchrous triggers
2+ messages / 2 participants
[nested] [flat]

* asynchrous triggers
@ 2005-04-01 03:52 Enrico Weigelt <weigelt@metux.de>
  2005-04-01 04:07 ` Re: asynchrous triggers Alvaro Herrera <alvherre@dcc.uchile.cl>
  0 siblings, 1 reply; 2+ messages in thread

From: Enrico Weigelt @ 2005-04-01 03:52 UTC (permalink / raw)
  To: pgsql-sql


hi folks,


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 ?


thx
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact@metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: asynchrous triggers
  2005-04-01 03:52 asynchrous triggers Enrico Weigelt <weigelt@metux.de>
@ 2005-04-01 04:07 ` Alvaro Herrera <alvherre@dcc.uchile.cl>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2005-04-01 04:07 UTC (permalink / raw)
  To: Enrico Weigelt <weigelt@metux.de>; +Cc: 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[@]dcc.uchile.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)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-04-01 04:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-01 03:52 asynchrous triggers Enrico Weigelt <weigelt@metux.de>
2005-04-01 04:07 ` Alvaro Herrera <alvherre@dcc.uchile.cl>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox