Re: transaction and triggers

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Gerardo Herzig <gherzig(at)fmed(dot)uba(dot)ar>
Cc: Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: transaction and triggers
Date: 2008-01-18 15:26:25
Message-ID: 20080118152625.GE5326@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gerardo Herzig 2008-01-18 15:33:56 Re: transaction and triggers
Previous Message Gerardo Herzig 2008-01-18 15:16:04 Re: transaction and triggers