pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Gerardo Herzig <gherzig@fmed.uba.ar>
Cc: Filip Rembiałkowski <plk.zuber@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: transaction and triggers
Date: Fri, 18 Jan 2008 12:26:25 -0300
Message-ID: <20080118152625.GE5326@alvh.no-ip.org> (raw)
In-Reply-To: <4790C2B4.1070103@fmed.uba.ar>
References: <4790B50A.5050101@fmed.uba.ar>
	<92869e660801180642i1fdd417r3d3b9399c5e5ab98@mail.gmail.com>
	<4790C2B4.1070103@fmed.uba.ar>

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.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (7+ messages)  latest in thread

Message-ID: <20080118152625.GE5326@alvh.no-ip.org>
Permalink:  ../20080118152625.GE5326@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20080118152625.GE5326@alvh.no-ip.org

 · 

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@commandprompt.com, gherzig@fmed.uba.ar, plk.zuber@gmail.com
  Subject: Re: transaction and triggers
  In-Reply-To: <20080118152625.GE5326@alvh.no-ip.org>

* 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