Re: Hash Indexes - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Hash Indexes
Date
Msg-id 20161018174635.qgndqdbz5piiwm72@alap3.anarazel.de
Whole thread Raw
In response to Re: Hash Indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2016-10-18 13:38:14 -0400, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Tue, Oct 18, 2016 at 5:37 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> >> I have implemented this idea and it works for MVCC scans.  However, I
> >> think this might not work for non-MVCC scans.  Consider a case where
> >> in Process-1, hash scan has returned one row and before it could check
> >> it's validity in heap, vacuum marks that tuple as dead and removed the
> >> entry from heap and some new tuple has been placed at that offset in
> >> heap.
> 
> > Oops, that's bad.
> 
> Do we care?  Under what circumstances would a hash index be used for a
> non-MVCC scan?

Uniqueness checks, are the most important one that comes to mind.

Andres



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Typo in foreign.h
Next
From: "David G. Johnston"
Date:
Subject: Re: Multiple psql history files