Re: Using Postgresql as application server
От | Sim Zacks |
---|---|
Тема | Re: Using Postgresql as application server |
Дата | |
Msg-id | 4E4C968E.3060900@compulab.co.il обсуждение исходный текст |
Ответ на | Re: Using Postgresql as application server (Chris Travers <chris.travers@gmail.com>) |
Список | pgsql-general |
On 08/17/2011 06:13 PM, Chris Travers wrote: <blockquote cite="mid:CAKt_ZftHwqGrYDhmMy3whik=5oqH7D5H1tQFGQrTJS98_7bMtA@mail.gmail.com"type="cite"><pre wrap="">On Tue, Aug 16, 2011at 11:53 PM, Sim Zacks <a class="moz-txt-link-rfc2396E" href="mailto:sim@compulab.co.il"><sim@compulab.co.il></a>wrote: </pre><blockquote type="cite"><pre wrap="">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. </pre></blockquote><pre wrap="">Notify hits on commit, right? Best Wishes, Chris Travers </pre></blockquote><p>My bad. I just tested this. Notify doesn't get send until after commit.<br />
В списке pgsql-general по дате отправления: