Re: Using Postgresql as application server

From: Chris Travers <chris(dot)travers(at)gmail(dot)com>
To: Sim Zacks <sim(at)compulab(dot)co(dot)il>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using Postgresql as application server
Date: 2011-08-17 15:13:05
Message-ID: CAKt_ZftHwqGrYDhmMy3whik=5oqH7D5H1tQFGQrTJS98_7bMtA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Tue, Aug 16, 2011 at 11:53 PM, Sim Zacks <sim(at)compulab(dot)co(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message specialisedtools 2011-08-17 16:02:28 Re: R: Re: adminpack installation problem
Previous Message Merlin Moncure 2011-08-17 14:40:55 Re: Using Postgresql as application server

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2011-08-17 15:49:29 Not Seeing Syntax Error
Previous Message Merlin Moncure 2011-08-17 14:40:55 Re: Using Postgresql as application server