#28062: Using QuerySet.iterator() with pgBouncer leads to nonexistent cursor 
errors
-------------------------------------+-------------------------------------
     Reporter:  Sergey Fursov        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.11
  (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 holvianssi):

 Opt-in is a good solution for end user code, but then library code can't
 opt-in, as library code can't know if it's running in pgBouncer setup or
 not. A database setting would get rid of this problem, but if there are
 cases where you want to use cursors for some cases, but not all of the
 cases, then you are screwed. The complex solution is to add both the opt-
 in flag and database settings. The default for the opt-in flag is None,
 meaning use the default from database settings. True forces this feature
 on, and False forces the feature off. Now, this covers all cases, but
 might create a situation where it's not easy for users to understand when
 exactly cursors are used.

 I'm slightly favouring the opt-in + database setting approach, next would
 be opt-in without database setting, and last database setting without opt-
 in. All of those solutions are fine for me, but I don't like the idea of
 removing the feature.

--
Ticket URL: <https://code.djangoproject.com/ticket/28062#comment:7>
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.fdaa93e523bf1f36e51b570bc98b6289%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to