Re: Hash Indexes

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hash Indexes
Date: 2016-09-01 18:03:42
Message-ID: 5f59920b-d516-5aec-a887-97810b5cf7de@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/05/2016 07:36 AM, Amit Kapila wrote:
> On Thu, Aug 4, 2016 at 8:02 PM, Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com> wrote:
>> I did some basic testing of same. In that I found one issue with cursor.
>>
>
> Thanks for the testing. The reason for failure was that the patch
> didn't take into account the fact that for scrolling cursors, scan can
> reacquire the lock and pin on bucket buffer multiple times. I have
> fixed it such that we release the pin on bucket buffers after we scan
> the last overflow page in bucket. Attached patch fixes the issue for
> me, let me know if you still see the issue.
>

Needs a rebase.

hashinsert.c

+ * reuse the space. There is no such apparent benefit from finsihing the

-> finishing

hashpage.c

+ * retrun the buffer, else return InvalidBuffer.

-> return

+ if (blkno == P_NEW)
+ elog(ERROR, "hash AM does not use P_NEW");

Left over ?

+ * for unlocking it.

-> for unlocking them.

hashsearch.c

+ * bucket, but not pin, then acuire the lock on new bucket and again

-> acquire

hashutil.c

+ * half. It is mainly required to finsh the incomplete splits where we are

-> finish

Ran some tests on a CHAR() based column which showed good results. Will
have to compare with a run with the WAL patch applied.

make check-world passes.

Best regards,
Jesper

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2016-09-01 18:04:24 Re: WAL consistency check facility
Previous Message Andrew Borodin 2016-09-01 18:01:17 Re: GiST penalty functions [PoC]