Josh Berkus <j...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers