#36502: bulk_create on Postgres doesn't use the unnest strategy when foreign 
keys
are involved since 5.2.1
-------------------------------------+-------------------------------------
     Reporter:  canardoFR            |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  5.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:  postgres             |             Triage Stage:  Accepted
  bulk_create unnest foreignkey      |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * cc: Simon Charette (added)
 * has_patch:  1 => 0
 * keywords:   => postgres bulk_create unnest foreignkey
 * needs_better_patch:  1 => 0
 * owner:  (none) => Simon Charette
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted
 * status:  new => assigned
 * summary:  bulk INSERT is not using UNNEST when a field is a FK on
     PostgreSQL =>
     bulk_create on Postgres doesn't use the unnest strategy when foreign
     keys are involved since 5.2.1
 * type:  Uncategorized => Bug

Comment:

 From looking at your attached monkey patching solution you seem to want to
 make sure the optimization introduced in Django 5.2 on Postgres to make
 use of `UNNEST` (see #35936)  is enabled when foreign keys are involved
 which appears to have been inadvertently disabled by
 764af7a3d6c0b543dcf659a2c327f214da768fe4 (see #36289).

 Going to move a release blocker since this a regression in 5.2.1.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36502#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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070197f0015ad8-3cb62618-9fe0-4ca1-a472-a3d087ab233b-000000%40eu-central-1.amazonses.com.

Reply via email to