I have a similar problem, though I am using PostgreSQL 8.1.3). I run a unittest that creates a bunch of records against the database, all of it using django and the model API.
This runs fine the first time, but shows the following stack trace on subsequent runs. It seems to hit the problem at the very first instance it is querying the database, on my second run of unittest This could be from an unfinished transaction from the first run, though, again, I don't explicitly do any transactions. I have to drop my DB, and reload all my data to clear the error! Traceback (most recent call last): File "/home/nara/ws/juglr/trunk/juglr/common/group/unittest.py", line 116, in ? unittest() File "/home/nara/ws/juglr/trunk/juglr/common/group/unittest.py", line 95, in u nittest fake_groups(7) File "/home/nara/ws/juglr/trunk/juglr/common/group/unittest.py", line 46, in f ake_groups curlen = len(Group.objects.all()) File "/usr/local/lib/python2.4/site-packages/django/db/models/query.py", line 100, in __len__ return len(self._get_data()) File "/usr/local/lib/python2.4/site-packages/django/db/models/query.py", line 430, in _get_data self._result_cache = list(self.iterator()) File "/usr/local/lib/python2.4/site-packages/django/db/models/query.py", line 170, in iterator cursor = connection.cursor() File "/usr/local/lib/python2.4/site-packages/django/db/backends/postgresql_psy copg2/base.py", line 47, in cursor cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE]) psycopg2.ProgrammingError: current transaction is aborted, commands ignored unti l end of transaction block /Nara Michael Radziej wrote: > Greg Plesur schrieb: > > So that's a work-around that I can use, but...is it okay behavior? That > > seems pretty broken. Is it possible that Django's DB connection has > > auto-commit off, but explicitly calls COMMIT internally on save() > > operations when there's no Django-level transaction in play? > > Looking at it like a database does, at least in theory, > everything happens in a transaction. auto-commit is only an > illusion ... or the database is broken in a fundamental way. > > Django probably does start a transaction somewhere, I don't know. > Try to trace your session and you'll see. > > Within the normal server http transactions, you don't get this > error. I have not seen it before. There are some settings in the > transaction documentation that might be worth playing with if it > gets in your way. Usually, it does not ... > > And, this turned out to be a really interesting question ;-) > > Michael --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---