Deprecating Hash Indexes

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Deprecating Hash Indexes
Date: 2012-10-14 13:45:49
Message-ID: CA+U5nM+OtSDn=R3gHq5HXFqaecTkwxXXX_vjipv2_tnOGKPTEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

As discussed on other threads, Hash Indexes are currently a broken
feature and bring us into disrepute.

I describe them as broken because they are neither crash safe, nor
could they properly be called unlogged indexes (or if so, why just
hash?). And also because if somebody suggested implementing them the
way they are now, they would be told they were insane because silent
data corruption is not something we tolerate anymore. We know why they
are like that, but its time to remove the rest of the historical
research legacy. It's hard to say "We respect your data [except if you
press here]" and be taken seriously.

Suggested actions are

* Put WARNINGs in the docs against the use of hash indexes, backpatch
to 8.3. CREATE INDEX gives no warning currently, though Index Types
does mention a caution.

* Mention in the current docs that hash indexes are likely to be
deprecated completely in future releases. Should anybody ever make
them work, we can change that advice quickly but I don't think we're
going to.

Personally, I would like to see them removed into a contrib module to
allow people to re-add them if they understand the risks. ISTM better
to confiscate all foot-guns before they go off and then re-issue them
to marksmen, at the risk of annoying the people that use them with
full knowledge but that's likely a contentious issue.

Alternate views?

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2012-10-14 14:25:59 Re: pg_stat_lwlocks view - lwlocks statistics, round 2
Previous Message Boszormenyi Zoltan 2012-10-14 11:41:07 Re: [PATCH] Make pg_basebackup configure and start standby [Review]