#24318: Can't configure Postgres isolation level if using recent psycopg2
-------------------------------------+-------------------------------------
     Reporter:  carljm               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.7
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by carljm):

 I think `get_or_create` may have issues on a different isolation level?
 Otherwise I'm not aware of areas where Django would work poorly, but there
 certainly may be others. AFAIK the default level for MySQL is "REPEATABLE
 READ"  (whereas for PostgreSQL it's "READ COMMITTED"), and I can't see
 anywhere we change that in the MySQL backend. And for SQLite AFAIK the
 only available isolation level is SERIALIZABLE. So unless I'm missing
 something I think Django core already implicitly "supports" three
 different transaction isolation levels, depending on your database
 backend.

 I'm not sure the feature historically existed _only_ for switching to
 autocommit - I've run into people who wanted "REPEATABLE READ" on
 PostgreSQL for whatever reason (often because they were converting a
 project from MySQL).

 I don't feel strongly, but we should either remove the documentation about
 setting the isolation level, or make it possible again, and given that
 it's a small change I'd slightly favor the latter. Perhaps the docs should
 be updated to note that Django does not test against PostgreSQL with any
 transaction isolation level other than the default.

--
Ticket URL: <https://code.djangoproject.com/ticket/24318#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.2ec2f5fe14158ec88476d5a80dd8f657%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to