Re: Using Postgresql as application server - Mailing list pgsql-general

From Chris Travers
Subject Re: Using Postgresql as application server
Date
Msg-id CAKt_ZftHwqGrYDhmMy3whik=5oqH7D5H1tQFGQrTJS98_7bMtA@mail.gmail.com
Whole thread Raw
In response to Re: Using Postgresql as application server  (Sim Zacks <sim@compulab.co.il>)
Responses Re: Using Postgresql as application server  (Sim Zacks <sim@compulab.co.il>)
List pgsql-general
On Tue, Aug 16, 2011 at 11:53 PM, Sim Zacks <sim@compulab.co.il> wrote:

> We are doing this same sort of thing now. If the transaction goes through,
> the email record gets written to a table. We have a cron job that calls a
> database function that processes all emails that have not been processed
> yet. If the transaction gets rolled back, the email record does not get
> written to the table and the email does not get sent.
> In your scenario, if you send the NOTIFY message and then you roll back the
> transaction, the helper application will still send the email. IOW, doing
> this outside of the database can more easily break your transactional
> integrity.
>
Notify hits on commit, right?

Best Wishes,
Chris Travers

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Using Postgresql as application server
Next
From: Rich Shepard
Date:
Subject: Not Seeing Syntax Error