Re: Let's drop two obsolete features which are bear-traps for novices - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Let's drop two obsolete features which are bear-traps for novices
Date
Msg-id 6424.1414863046@sss.pgh.pa.us
Whole thread Raw
In response to Re: Let's drop two obsolete features which are bear-traps for novices  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Let's drop two obsolete features which are bear-traps for novices  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> On 10/31/2014 03:07 PM, Tom Lane wrote:
>> I don't care one way or the other about the money type, but I will defend
>> hash indexes, especially seeing that we've already added a pretty
>> in-your-face warning as of 9.5:
>> 
>> regression=# create table foo(f1 int);
>> CREATE TABLE
>> regression=# create index on foo using hash (f1);
>> WARNING:  hash indexes are not WAL-logged and their use is discouraged
>> CREATE INDEX

> Yes, and I'm arguing that is the wrong decision.  If hash indexes are
> "discouraged", then they shouldn't be in core in the first place.

There's an awful lot of stuff in core that probably shouldn't be there,
but we've not made a move to rip it out, especially not if there wasn't
a way to make it an external module.

In the case of hash indexes, because we still have to have the hash
opclasses in core, there's no way that it could be pushed out as an
extension module even if we otherwise had full support for AMs as
extensions.  So what I hear you proposing is "let's break this so
thoroughly that it *can't* be fixed".  I'm not on board with that.
I think the WARNING will do just fine to discourage novices who are
not familiar with the state of the hash AM.  In the meantime, we
could push forward with the idea of making hash indexes automatically
unlogged, so that recovering from a crash wouldn't be quite so messy/
dangerous.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Let's drop two obsolete features which are bear-traps for novices
Next
From: Andres Freund
Date:
Subject: Re: Pipelining executions to postgresql server