On Mon, 2010-09-06 at 16:47 +0200, Robert Gravsjö wrote:
> Can you please show me the code you're running to reproduce this?
> 
> Regards,
> roppert

I've experienced what Patryk is describing here. It seems that the
Django ORM, when not explicitly in a transaction, doesn't commit or
rollback after each query.

You can reproduce this simply in the dbshell. Go into your favorite
project and try this (replacing `myproject`, `myapp`, and `MyModel`
appropriately):

from myproject.myapp import models
models.MyModel.objects.all()[:1]

Now, in a superuser database connection, check the results of "select *
from pg_stat_activity." You should see the database connection from the
dbshell stuck in the "<IDLE> in transaction" state.

Regards,
Jordan

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to