Re: [Django] #36502: bulk_create on Postgres doesn't use the unnest strategy when foreign keys are involved since 5.2.1

8 views
Skip to first unread message

Django

unread,
Jul 9, 2025, 1:15:22 PMJul 9
to django-...@googlegroups.com
#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: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* has_patch: 0 => 1

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

Django

unread,
Jul 10, 2025, 12:31:25 PMJul 10
to django-...@googlegroups.com
#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: Ready for
bulk_create unnest foreignkey | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/36502#comment:5>

Django

unread,
Jul 10, 2025, 12:33:11 PMJul 10
to django-...@googlegroups.com
#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: closed
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: postgres | Triage Stage: Ready for
bulk_create unnest foreignkey | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"0fe218842e0e396e3ab3982bd21227968a9e7fd8" 0fe2188]:
{{{#!CommitTicketReference repository=""
revision="0fe218842e0e396e3ab3982bd21227968a9e7fd8"
Fixed #36502 -- Restored UNNEST strategy for foreign key bulk inserts on
PostgreSQL.

Regression in 764af7a3d6c0b543dcf659a2c327f214da768fe4.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36502#comment:6>

Django

unread,
Jul 10, 2025, 12:38:43 PMJul 10
to django-...@googlegroups.com
#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: closed
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: postgres | Triage Stage: Ready for
bulk_create unnest foreignkey | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"3df1ad57bfcabaf75e4617064d79610f185f3f9f" 3df1ad57]:
{{{#!CommitTicketReference repository=""
revision="3df1ad57bfcabaf75e4617064d79610f185f3f9f"
[5.2.x] Fixed #36502 -- Restored UNNEST strategy for foreign key bulk
inserts on PostgreSQL.

Regression in 764af7a3d6c0b543dcf659a2c327f214da768fe4.

Backport of 0fe218842e0e396e3ab3982bd21227968a9e7fd8 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36502#comment:7>
Reply all
Reply to author
Forward
0 new messages