pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@dcc.uchile.cl>
To: Enrico Weigelt <weigelt@metux.de>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: asynchrous triggers
Date: Fri, 1 Apr 2005 00:07:41 -0400
Message-ID: <20050401040741.GA9898@dcc.uchile.cl> (raw)
In-Reply-To: <20050401035249.GA23298@nibiru.borg.metux.de>
References: <20050401035249.GA23298@nibiru.borg.metux.de>

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)



view thread (2+ messages)

Message-ID: <20050401040741.GA9898@dcc.uchile.cl>
Permalink:  ../20050401040741.GA9898@dcc.uchile.cl/
Also on:    postgresql.org/message-id/20050401040741.GA9898@dcc.uchile.cl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: alvherre@dcc.uchile.cl, weigelt@metux.de
  Subject: Re: asynchrous triggers
  In-Reply-To: <20050401040741.GA9898@dcc.uchile.cl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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