Opened 8 years ago
Closed 6 years ago
#26974 closed New feature (fixed)
Add support for Hash indexes
Reported by: | Akshesh Doshi | Owned by: | Nick Pope |
---|---|---|---|
Component: | contrib.postgres | Version: | dev |
Severity: | Normal | Keywords: | hash, index, postgres, db-indexes |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Adding support for using hash indexes.
These indexes are only supported by postgresql and by only by a very 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 ?
Change History (9)
comment:1 by , 8 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 8 years ago
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/
comment:3 by , 8 years ago
Triage Stage: | Unreviewed → Someday/Maybe |
---|
Given the last comment, it seems prudent to have a discussion on the DevelopersMailingList about whether or not to implement this.
comment:4 by , 7 years ago
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.
comment:5 by , 7 years ago
Keywords: | hash index postgres added; db-indexes removed |
---|---|
Owner: | changed from | to
Triage Stage: | Someday/Maybe → Unreviewed |
As per my previous comment, hash indexes have been fixed in PostgreSQL 10.
New pull request incoming...
comment:6 by , 7 years ago
Component: | Database layer (models, ORM) → contrib.postgres |
---|---|
Summary: | Support for Hash indexes → Add support for Hash indexes |
Triage Stage: | Unreviewed → Accepted |
comment:7 by , 7 years ago
Keywords: | db-indexes added |
---|
comment:8 by , 6 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
PR: https://github.com/django/django/pull/6995