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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Let's drop two obsolete features which are bear-traps for novices
Date: 2014-11-01 17:30:46
Message-ID: 6424.1414863046@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-11-01 17:31:16 Re: Pipelining executions to postgresql server
Previous Message Andres Freund 2014-11-01 17:26:42 Re: Let's drop two obsolete features which are bear-traps for novices