Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23954 closed Bug (fixed)

migrations doesnt create {text|varchar}_pattern_ops for postgres indexes

Reported by: adityagupta104 Owned by: Claude Paroz
Component: Migrations Version: 1.7
Severity: Release blocker Keywords: postgres indexes pattern_ops
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This is an issue which was raised a looong time ago and was fixed for syncdb here - #12234 and #19441.
Django 1.7.1 doesnt add these additional indexes for postgres when using migrations. duh.

Change History (5)

comment:1 by Baptiste Mispelon, 10 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

Hi,

I can indeed reproduce this on 1.7 and master.
It seems that tests were added for the varchar_patter_ops after #12234 [1] but they still pass (probably because they don't use the same codepath that the migrations framework uses).

This might be a serious performance issue so I'm upping the severity to "release blocker".

Thanks!

[1] https://github.com/django/django/blob/master/tests/indexes/tests.py

comment:2 by Tim Graham, 10 years ago

Claude has done some work in moving more DatabaseCreation functionality to the schema editor in PR 3220. I've asked if he might be able to create a patch that would be appropriate for backporting based on that work.

comment:3 by Claude Paroz, 10 years ago

Owner: changed from nobody to Claude Paroz
Status: newassigned

comment:4 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 8d7a48027ef6848f693f57ae442a1b0ace0ebcdc:

Fixed #23954 -- Added special text/varchar PostgreSQL indexes in migrations

Thanks adityagupta104 for the report and Tim Graham for the review.

comment:5 by Claude Paroz <claude@…>, 10 years ago

In 6ba960266a14756dbf6365029d46bd157bd2b155:

[1.7.x] Fixed #23954 -- Added special text/varchar PostgreSQL indexes in migrations

Thanks adityagupta104 for the report and Tim Graham for the review.
Backport of 8d7a48027e from master.

Note: See TracTickets for help on using tickets.
Back to Top