Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 926202E30C5 for ; Fri, 18 Jan 2008 11:32:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 09704-01-2 for ; Fri, 18 Jan 2008 11:32:12 -0400 (AST) Received: from mail.fmed.uba.ar (mail.fmed.uba.ar [157.92.152.1]) by postgresql.org (Postfix) with ESMTP id 2D22B2E4717 for ; Fri, 18 Jan 2008 11:32:18 -0400 (AST) Received: from [157.92.155.58] (mailbis [157.92.155.58]) by mail.fmed.uba.ar (Postfix) with ESMTP id D310511C5BD; Fri, 18 Jan 2008 13:32:26 -0200 (ARST) Message-ID: <4790C6E4.4030002@fmed.uba.ar> Date: Fri, 18 Jan 2008 12:33:56 -0300 From: Gerardo Herzig User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alvaro Herrera CC: =?UTF-8?B?RmlsaXAgUmVtYmlhxYJrb3dza2k=?= , pgsql-sql@postgresql.org Subject: Re: transaction and triggers References: <4790B50A.5050101@fmed.uba.ar> <92869e660801180642i1fdd417r3d3b9399c5e5ab98@mail.gmail.com> <4790C2B4.1070103@fmed.uba.ar> <20080118152625.GE5326@alvh.no-ip.org> In-Reply-To: <20080118152625.GE5326@alvh.no-ip.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/152 X-Sequence-Number: 30005 Alvaro Herrera wrote: >Gerardo Herzig escribió: > > > >>Right. But today, that trigger do some other work, wich includes writing >>some files to disk, so there is my problem. Crap, i guess i will have to >>review the main logic. >> >> > >Probably it's better to move the actual file writing to a listener >external process -- the transaction only does a NOTIFY, which is certain >to be delivered only when the transaction commits. So if it aborts, no >spurious write occurs. > > > Mmmhmm, sounds good...I will give it a try on monday. Now its beer time :) Thanks all. Gerardo