Opened 17 years ago
Closed 12 years ago
#5063 closed Bug (fixed)
PostgreSQL connection close when using model with a OneToOneField and a ManyToManyField
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
I'm attaching models and tests files that raise unclear errors with r4610 (which is still the case with r5788), but raise straightforward errors with r4609. If you run the test code from within a Python shell, you'll see that at first clear error messages are given, but after a couple of errors the PostgreSQL connection is closed and you get InterfaceError: connection already closed
. When run as a doctest, the InterfaceError occurs before the straightforward error message is ever displayed.
This bug report is about the PostgreSQL connection close. This is the simplest models file that I was able to cause the error with.
I'm using psycopg2 2.0.6, PostgreSQL 8.2, Python 2.5, and Windows XP.
Attachments (5)
Change History (15)
by , 17 years ago
comment:1 by , 17 years ago
The connection close doesn't occur with the psycopg backend.
Jim Moffitt's patch in #3460 fixes this issue.
comment:3 by , 17 years ago
Has patch: | set |
---|---|
Needs tests: | set |
Version: | SVN → 0.96 |
comment:4 by , 17 years ago
Version: | 0.96 → SVN |
---|
Whoops, didn't mean to change the version - my apologies.
The submitted patch however has only been tested with 0.96
comment:5 by , 17 years ago
Patch needs improvement: | set |
---|
Thanks for the patch, asderose. If you can, it'd be better to provide the patch against SVN (it's extremely doubtful that this fix would be backported to 0.96).
comment:6 by , 17 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 17 years ago
Attachment: | psycopg2.patch added |
---|
Updated version for Django trunk. Note: This requires testing in production
comment:7 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:10 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I don't believe this to be an issue any longer. We would have heard more of this if this were still an issue...
The test case models file.