Re: Why is Hash index not transaction safe. - Mailing list pgsql-novice

From Tom Lane
Subject Re: Why is Hash index not transaction safe.
Date
Msg-id 29964.1430712693@sss.pgh.pa.us
Whole thread Raw
In response to Why is Hash index not transaction safe.  (Wei Shan <weishan.ang@gmail.com>)
Responses Re: Why is Hash index not transaction safe.  (Paul Linehan <linehanp@tcd.ie>)
List pgsql-novice
Wei Shan <weishan.ang@gmail.com> writes:
> I read the following about Hash indexes in Heroku's blog (
> https://devcenter.heroku.com/articles/postgresql-indexes)

> *Hash Indexes are only useful for equality comparisons, but you pretty much
> never want to use them since they are not transaction safe, need to be
> manually rebuilt after crashes, and are not replicated to followers, so the
> advantage over using a B-Tree is rather small.*

> Could anyone explain about why is it not transaction safe as compared to
> B-Tree index.

They're not crash-safe because they don't have any WAL support, and
WAL-based replication doesn't work for the same reason.  But I think
the bit about not being transaction-safe is nonsense ...

            regards, tom lane


pgsql-novice by date:

Previous
From: Wei Shan
Date:
Subject: Why is Hash index not transaction safe.
Next
From: Paul Linehan
Date:
Subject: Re: Why is Hash index not transaction safe.