Re: pageinspect: Hash index support
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Mithun Cy <mithun.cy@enterprisedb.com>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>,
Ashutosh Sharma <ashu.coek88@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Michael Paquier <michael.paquier@gmail.com>,
Jeff Janes <jeff.janes@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-01-17T09:36:42Z
Lists: pgsql-hackers
On Tue, Jan 17, 2017 at 1:22 PM, Mithun Cy <mithun.cy@enterprisedb.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
Commits
-
Fix incorrect typecast.
- b4316928d57b 10.0 landed
-
In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines.
- 14e9b18fed28 10.0 landed
-
pageinspect: Support hash indexes.
- 08bf6e529587 10.0 landed
-
Add uuid to the set of types supported by contrib/btree_gist.
- 11da83a0e70d 10.0 cited
-
Allow CREATE EXTENSION to follow extension update paths.
- 40b449ae84dc 10.0 cited