summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Johnson <me@adamj.eu>2023-10-15 09:27:11 +0100
committerGitHub <noreply@github.com>2023-10-15 10:27:11 +0200
commit73b2c63127297e214d3bfdc8d9a96837691fc2a0 (patch)
tree8df66cf4f43bba5ca4eae04af787af7463458a2e
parent9fd3a0ffc8fb8e532b0d5717f99fb15aff175a6c (diff)
Refs #34840 -- Improved release note describing index regression.
-rw-r--r--docs/releases/4.2.6.txt17
1 files changed, 12 insertions, 5 deletions
diff --git a/docs/releases/4.2.6.txt b/docs/releases/4.2.6.txt
index 9b99d8c622..829988014d 100644
--- a/docs/releases/4.2.6.txt
+++ b/docs/releases/4.2.6.txt
@@ -35,9 +35,16 @@ Bugfixes
* Fixed a regression in Django 4.2 that caused unnecessary casting of string
based fields (``CharField``, ``EmailField``, ``TextField``, ``CICharField``,
``CIEmailField``, and ``CITextField``) used with the ``__isnull`` lookup on
- PostgreSQL. As a consequence, the pre-Django 4.2 indexes didn't match and
- were not used by the query planner (:ticket:`34840`).
+ PostgreSQL. As a consequence, indexes using an ``__isnull`` expression or
+ 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
- 4.2 - 4.2.5 as they contain unnecessary ``::text`` casting that is avoided as
- of this release.
+ You may need to recreate such indexes created in your database with Django
+ 4.2 to 4.2.5, as they contain unnecessary ``::text`` casting. Find candidate
+ indexes with this query:
+
+ .. code-block:: sql
+
+ SELECT indexname, indexdef
+ FROM pg_indexes
+ WHERE indexdef LIKE '%::text IS %NULL';