[Django] #32487: GIN indexes on Postgres doesn't work with --nomigrations

20 views
Skip to first unread message

Django

unread,
Feb 27, 2021, 9:01:24 AM2/27/21
to django-...@googlegroups.com
#32487: GIN indexes on Postgres doesn't work with --nomigrations
------------------------------------------+------------------------
Reporter: Iuri de Silvio | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
I want to test with --nomigrations for performance reasons, but I have a
GIN index and it fails because it doesn't execute a `CREATE EXTENSION
btree_gin`.

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

Django

unread,
Feb 27, 2021, 9:01:38 AM2/27/21
to django-...@googlegroups.com
#32487: GIN indexes on Postgres doesn't work with --nomigrations
--------------------------------+------------------------------------------
Reporter: Iuri de Silvio | Owner: Iuri de Silvio
Type: Bug | Status: assigned
Component: Migrations | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Iuri de Silvio):

* owner: nobody => Iuri de Silvio
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/32487#comment:1>

Django

unread,
Feb 28, 2021, 10:24:31 AM2/28/21
to django-...@googlegroups.com
#32487: GIN indexes on Postgres doesn't work with --nomigrations
--------------------------------+------------------------------------------
Reporter: Iuri de Silvio | Owner: Iuri de Silvio
Type: Bug | Status: assigned
Component: Migrations | Version: 3.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------

Comment (by Iuri de Silvio):

I fixed my issue creating the extension on `pre_migrate` signal. I think
it is a reasonable solution to decouple extension setup and index
creation.

I tried some solutions with Django internals but they're not good. Signal
works for me and after some investigation I don't think it should be
handled by Django.

--
Ticket URL: <https://code.djangoproject.com/ticket/32487#comment:2>

Django

unread,
Feb 28, 2021, 6:19:36 PM2/28/21
to django-...@googlegroups.com
#32487: GIN indexes on Postgres doesn't work with --nomigrations
--------------------------------+------------------------------------------
Reporter: Iuri de Silvio | Owner: Iuri de Silvio
Type: Bug | Status: closed
Component: Migrations | Version: 3.1
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Simon Charette):

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


Comment:

I also agree that this shouldn't be handled by Django by default.

--
Ticket URL: <https://code.djangoproject.com/ticket/32487#comment:3>

Reply all
Reply to author
Forward
0 new messages