mirror of
https://github.com/django/django.git
synced 2024-12-26 11:06:07 +00:00
[5.0.x] Refs #34840 -- Improved release note describing index regression.
Backport of 73b2c63127
from main
This commit is contained in:
parent
c3cf518a80
commit
12a19321b4
@ -35,9 +35,16 @@ Bugfixes
|
|||||||
* Fixed a regression in Django 4.2 that caused unnecessary casting of string
|
* Fixed a regression in Django 4.2 that caused unnecessary casting of string
|
||||||
based fields (``CharField``, ``EmailField``, ``TextField``, ``CICharField``,
|
based fields (``CharField``, ``EmailField``, ``TextField``, ``CICharField``,
|
||||||
``CIEmailField``, and ``CITextField``) used with the ``__isnull`` lookup on
|
``CIEmailField``, and ``CITextField``) used with the ``__isnull`` lookup on
|
||||||
PostgreSQL. As a consequence, the pre-Django 4.2 indexes didn't match and
|
PostgreSQL. As a consequence, indexes using an ``__isnull`` expression or
|
||||||
were not used by the query planner (:ticket:`34840`).
|
condition created before Django 4.2 wouldn't be used by the query planner,
|
||||||
|
leading to a performance regression (:ticket:`34840`).
|
||||||
|
|
||||||
You may need to recreate indexes propagated to the database with Django
|
You may need to recreate such indexes created in your database with Django
|
||||||
4.2 - 4.2.5 as they contain unnecessary ``::text`` casting that is avoided as
|
4.2 to 4.2.5, as they contain unnecessary ``::text`` casting. Find candidate
|
||||||
of this release.
|
indexes with this query:
|
||||||
|
|
||||||
|
.. code-block:: sql
|
||||||
|
|
||||||
|
SELECT indexname, indexdef
|
||||||
|
FROM pg_indexes
|
||||||
|
WHERE indexdef LIKE '%::text IS %NULL';
|
||||||
|
Loading…
Reference in New Issue
Block a user