Re: Hash Indexes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hash Indexes
Date: 2016-06-23 17:26:37
Message-ID: CA+Tgmob3jKRVQzzdUmco-Hya4dOMgqUrhSPak46CFETF9KZWkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 22, 2016 at 10:13 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>> A scan that has seen the flag won't look at the
>> tuple in any case.
>
> Why so? Assume that scan started on new bucket where
> split-in-progress flag was set, now it will not look at tuples that
> are marked as moved-by-split in this bucket, as it will assume to find
> all such tuples in old bucket. Now, if allow Vacuum or someone else
> to remove tuples from old with just an Exclusive lock, it is quite
> possible that scan miss the tuple in old bucket which got removed by
> vacuum.

Oh, you're right. So we really need to CLEAR the split-in-progress
flag before removing any tuples from the old bucket. Does that sound
right?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-06-23 17:29:35 Re: Bug in to_timestamp().
Previous Message Tom Lane 2016-06-23 17:25:01 Re: Rethinking representation of partial-aggregate steps