| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Wei Shan <weishan(dot)ang(at)gmail(dot)com> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: Why is Hash index not transaction safe. |
| Date: | 2015-05-04 04:11:33 |
| Message-ID: | 29964.1430712693@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Wei Shan <weishan(dot)ang(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Paul Linehan | 2015-05-04 23:55:18 | Re: Why is Hash index not transaction safe. |
| Previous Message | Wei Shan | 2015-05-04 03:26:30 | Why is Hash index not transaction safe. |