X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8F2F753838 for ; Fri, 1 Apr 2005 05:08:01 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29688-09 for ; Fri, 1 Apr 2005 04:07:53 +0000 (GMT) Received: from sunsite.dcc.uchile.cl (sunsite.dcc.uchile.cl [192.80.24.2]) by svr1.postgresql.org (Postfix) with ESMTP id A1F0153758 for ; Fri, 1 Apr 2005 05:07:51 +0100 (BST) Received: from anakena.dcc.uchile.cl (anakena [192.80.24.6]) by sunsite.dcc.uchile.cl (8.12.11/8.12.11) with ESMTP id j3147fuw018236; Fri, 1 Apr 2005 00:07:46 -0400 (CLT) Received: by anakena.dcc.uchile.cl (Postfix, from userid 4151) id A903F52BA8; Fri, 1 Apr 2005 00:07:41 -0400 (CLT) Date: Fri, 1 Apr 2005 00:07:41 -0400 From: Alvaro Herrera To: Enrico Weigelt Cc: pgsql-sql Subject: Re: asynchrous triggers Message-ID: <20050401040741.GA9898@dcc.uchile.cl> References: <20050401035249.GA23298@nibiru.borg.metux.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050401035249.GA23298@nibiru.borg.metux.de> User-Agent: Mutt/1.5.8i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.344 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200504/3 X-Sequence-Number: 20896 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 () "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)