[Django] #26974: Support for Hash indexes

31 views
Skip to first unread message

Django

unread,
Jul 31, 2016, 5:16:41 AM7/31/16
to django-...@googlegroups.com
#26974: Support for Hash indexes
----------------------------------------------+------------------------
Reporter: akki | Owner: nobody
Type: New feature | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords: db-indexes
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+------------------------
Adding support for using hash indexes.

These indexes are only supported by postgresql and by only by a very
[http://dev.mysql.com/doc/refman/5.7/en/create-index.html#create-index-
storage-engine-index few engines] (neither InnoDB nor MyISAM though) on
mysql.

Also, since practically this index is supported only by postgres, would it
be a good idea to add it to contrib.postgres ?

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

Django

unread,
Jul 31, 2016, 5:47:51 AM7/31/16
to django-...@googlegroups.com
#26974: Support for Hash indexes
-------------------------------------+-------------------------------------
Reporter: akki | Owner: akki
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:

Keywords: db-indexes | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by akki):

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => akki
* needs_docs: => 0
* has_patch: 0 => 1


Comment:

PR: https://github.com/django/django/pull/6995

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

Django

unread,
Jul 31, 2016, 5:05:05 PM7/31/16
to django-...@googlegroups.com
#26974: Support for Hash indexes
-------------------------------------+-------------------------------------
Reporter: akki | Owner: akki
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: db-indexes | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by pope1ni):

I'm not sure that hash indexes are a good idea right now as they are
currently not replication- or crash-safe.

See the documentation: https://www.postgresql.org/docs/9.5/static/indexes-
types.html

It looks like some work is being done to resolve this:
https://commitfest.postgresql.org/10/647/

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

Django

unread,
Aug 2, 2016, 2:56:58 PM8/2/16
to django-...@googlegroups.com
#26974: Support for Hash indexes
-------------------------------------+-------------------------------------
Reporter: akki | Owner: akki
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: db-indexes | Triage Stage:
| Someday/Maybe

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Someday/Maybe


Comment:

Given the last comment, it seems prudent to have a discussion on the
DevelopersMailingList about whether or not to implement this.

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

Django

unread,
Nov 10, 2017, 9:09:47 AM11/10/17
to django-...@googlegroups.com
#26974: Support for Hash indexes
-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: Akshesh
| Doshi

Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: db-indexes | Triage Stage:
| Someday/Maybe
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Nick Pope):

I think this could be revisited now that PostgreSQL 10 is released and
hash indexes have been fixed:

- http://rhaas.blogspot.co.uk/2017/09/postgresqls-hash-indexes-are-now-
cool.html
- https://medium.com/@jorsol/postgresql-10-features-hash-indexes-
484f319db281
- https://commitfest.postgresql.org/13/740/
- https://commitfest.postgresql.org/11/647/

We should limit use of this index type to PostgreSQL 10 or later if that
is possible.

--
Ticket URL: <https://code.djangoproject.com/ticket/26974#comment:4>

Django

unread,
Dec 5, 2017, 5:04:55 AM12/5/17
to django-...@googlegroups.com
#26974: Support for Hash indexes
-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: Nick Pope

Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: hash, index, | Triage Stage:
postgres | Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Nick Pope):

* owner: Akshesh Doshi => Nick Pope
* keywords: db-indexes => hash, index, postgres
* stage: Someday/Maybe => Unreviewed


Comment:

As per my previous comment, hash indexes have been fixed in PostgreSQL 10.

New pull request incoming...

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

Django

unread,
Dec 5, 2017, 11:41:17 AM12/5/17
to django-...@googlegroups.com
#26974: Add support for Hash indexes

-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: Nick Pope
Type: New feature | Status: assigned
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: hash, index, | Triage Stage: Accepted
postgres |

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* component: Database layer (models, ORM) => contrib.postgres
* stage: Unreviewed => Accepted


Comment:

[https://github.com/django/django/pull/9424 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/26974#comment:6>

Django

unread,
Dec 6, 2017, 4:03:20 AM12/6/17
to django-...@googlegroups.com
#26974: Add support for Hash indexes
-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: Nick Pope
Type: New feature | Status: assigned
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: hash, index, | Triage Stage: Accepted
postgres, db-indexes |

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Akshesh Doshi):

* keywords: hash, index, postgres => hash, index, postgres, db-indexes


--
Ticket URL: <https://code.djangoproject.com/ticket/26974#comment:7>

Django

unread,
Aug 2, 2018, 4:26:55 AM8/2/18
to django-...@googlegroups.com
#26974: Add support for Hash indexes
-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: Nick Pope
Type: New feature | Status: assigned
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: hash, index, | Triage Stage: Ready for
postgres, db-indexes | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/26974#comment:8>

Django

unread,
Aug 2, 2018, 10:43:27 AM8/2/18
to django-...@googlegroups.com
#26974: Add support for Hash indexes
-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: Nick Pope
Type: New feature | Status: closed
Component: contrib.postgres | Version: master
Severity: Normal | Resolution: fixed

Keywords: hash, index, | Triage Stage: Ready for
postgres, db-indexes | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"d526b07784d8caa208055c1f2bd1cedc88fb52dc" d526b077]:
{{{
#!CommitTicketReference repository=""
revision="d526b07784d8caa208055c1f2bd1cedc88fb52dc"
Fixed #26974 -- Added HashIndex to django.contrib.postgres.

Thanks Akshesh Doshi for the initial implementation.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26974#comment:9>

Reply all
Reply to author
Forward
0 new messages