On 08/17/2011 06:13 PM, Chris Travers wrote:
On Tue, Aug 16, 2011 at 11:53 PM, Sim Zacks <s...@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 My bad. I just tested this. Notify doesn't get send until after
commit. |
- Re: [GENERAL] [] Using Postgres... John R Pierce
- Re: [GENERAL] [] Using Postgres... Steve Atkins
- Re: [GENERAL] Using Postgresql as application server Darren Duncan
- Re: [GENERAL] Using Postgresql as application server Chris Travers
- Re: [GENERAL] Using Postgresql as application se... Merlin Moncure
- Re: [GENERAL] Using Postgresql as application se... Darren Duncan
- Re: [GENERAL] Using Postgresql as applicatio... Chris Travers
- Re: [GENERAL] Using Postgresql as application se... Sim Zacks
- Re: [GENERAL] Using Postgresql as applicatio... Scott Ribe
- Re: [GENERAL] Using Postgresql as applicatio... Chris Travers
- Re: [GENERAL] Using Postgresql as applic... Sim Zacks
- Re: [GENERAL] Using Postgresql as application se... Dimitri Fontaine
- Re: [GENERAL] Using Postgresql as applicatio... Chris Travers
- Re: [GENERAL] Using Postgresql as application server David Johnston
- Re: [GENERAL] Using Postgresql as application se... Merlin Moncure
- Re: [GENERAL] Using Postgresql as applicatio... David Johnston
- Re: [GENERAL] Using Postgresql as application se... Darren Duncan
- Re: [GENERAL] Using Postgresql as applicatio... Chris Travers
- Re: [GENERAL] Using Postgresql as applic... Darren Duncan
- Re: [GENERAL] Using Postgresql as a... Sim Zacks
- Re: [GENERAL] Using Postgresql ... Scott Ribe