Re: pageinspect: Hash index support

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>
Cc: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pageinspect: Hash index support
Date: 2017-01-17 09:36:42
Message-ID: CAA4eK1+4DEbUpoq+9JM5297_aLeL=D_vU4x1fcci5BhrHEVDKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 17, 2017 at 1:22 PM, Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com> wrote:
>>
>> 7. I think it is not your bug, but probably a bug in Hash index
>> itself; page flag is set to 66 (for below test); So the page is both
>> LH_BUCKET_PAGE and LH_BITMAP_PAGE. Is not this a bug in hash index?
>>
>> I have inserted 3000 records. Hash index is on integer column.
>> select hasho_flag FROM hash_page_stats(get_raw_page('i1', 1));
>> hasho_flag
>> ------------
>> 66
>>
>
> Here is the test for same. After insertion of 3000 records, I think at
> first split we can see bucket page flag is set with LH_BITMAP_PAGE.
>

I think your calculation is not right. 66 indicates LH_BUCKET_PAGE |
LH_BUCKET_NEEDS_SPLIT_CLEANUP which is a valid state after the split.
This flag will be cleared either during next split or when vacuum
operates on that index page.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mithun Cy 2017-01-17 09:57:13 Re: pageinspect: Hash index support
Previous Message Fujii Masao 2017-01-17 08:40:46 pgsql: Fix an assertion failure related to an exclusive backup.