Re: Page Scan Mode in Hash Index

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Page Scan Mode in Hash Index
Date: 2017-04-04 11:57:03
Message-ID: CA+TgmoZSxLgMW8zisxGfK1Z8qthCkv_OnES0O5qU1uT_eJ9Y1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 4, 2017 at 6:29 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Mon, Mar 27, 2017 at 7:04 PM, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> wrote:
>> My guess (which could be wrong) is that so->hashso_bucket_buf =
>>> InvalidBuffer should be moved back up higher in the function where it
>>> was before, just after the first if statement, and that the new
>>> condition so->hashso_bucket_buf == so->currPos.buf on the last
>>> _hash_dropbuf() should be removed. If that's not right, then I think
>>> I need somebody to explain why not.
>>
>> Okay, as i mentioned above, in case of page scan mode we only keep pin
>> on a bucket buf. There won't be any case where we will be having pin
>> on overflow buf at the end of scan.
>>
>
> What if mark the buffer as invalid after releasing the pin? We are
> already doing it that way in btree code, refer
> _bt_drop_lock_and_maybe_pin(). I think if we do that way, then we can
> do what Robert is suggesting.

Please continue reviewing, but I think we're out of time to get this
patch into v10. This patch seems to be still under fairly heavy
revision, and we're only a couple of days from feature freeze, and the
patch upon which it depends (page-at-a-time vacuum) has had no fewer
than four follow-up commits repairing various problems with the logic,
with no guarantee that we've found all the bugs yet. In view of those
facts, I don't think it would be wise for me to commit this to v10, so
I'm instead going to move it to the next CommitFest.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-04-04 12:01:32 Re: Parallel Append implementation
Previous Message Robert Haas 2017-04-04 11:45:21 Re: [POC] A better way to expand hash indexes.