Opened 22 months ago

Last modified 6 months ago

#26974 assigned New feature

Add support for Hash indexes

Reported by: Akshesh Doshi Owned by: Nick Pope
Component: contrib.postgres Version: master
Severity: Normal Keywords: hash, index, postgres, db-indexes
Cc: Triage Stage: Accepted
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 (7)

comment:1 Changed 22 months ago by Akshesh Doshi

Has patch: set
Owner: changed from nobody to Akshesh Doshi
Status: newassigned

comment:2 Changed 22 months ago by Nick Pope

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 Changed 22 months ago by Tim Graham

Triage Stage: UnreviewedSomeday/Maybe

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

comment:4 Changed 6 months ago by Nick Pope

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

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

comment:5 Changed 6 months ago by Nick Pope

Keywords: hash index postgres added; db-indexes removed
Owner: changed from Akshesh Doshi to Nick Pope
Triage Stage: Someday/MaybeUnreviewed

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

New pull request incoming...

comment:6 Changed 6 months ago by Tim Graham

Component: Database layer (models, ORM)contrib.postgres
Summary: Support for Hash indexesAdd support for Hash indexes
Triage Stage: UnreviewedAccepted

comment:7 Changed 6 months ago by Akshesh Doshi

Keywords: db-indexes added
Note: See TracTickets for help on using tickets.
Back to Top