msoulier wrote:
> Looking at the transaction middleware that wraps a transaction around
> every HTTP request, I've found that it only commits if the transaction
> is "dirty" (you change something).
>
> So, if you use this middleware unconditionally, then in view functions
> that only read, the transaction will never be committed.
>
> Even when you read, postgres implicitly locks tables for reading.
>
> I am finding that since commit is never called in these cases, the
> locks persist.
>
> Is anyone using the transaction middleware with postgres? I have to
> assume so. If so, then what am I doing wrong?
>
>   
I took a quick glance at transaction.py (where the TransactionMiddleware 
class is defined), and it appears you are correct.  However, it should 
be pretty easy to roll your own transaction class that skips the 
is_dirty check.

This should probably be a bug report in any case.

Jeffrey Straszheim

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to