Re: [HACKERS] pageinspect: Hash index support - Mailing list pgsql-hackers

From Ashutosh Sharma
Subject Re: [HACKERS] pageinspect: Hash index support
Date
Msg-id CAE9k0P=_MeToWcKsNrbTcO6uvqDnaJ6mrJ4Si81CCu61XpBGyQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pageinspect: Hash index support  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: [HACKERS] pageinspect: Hash index support  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
>> Secondly, we will have to input overflow block number as an input to
>> this function so as to determine the overflow bit number which can be
>> used further to identify the bitmap page.
>>
>
> I think you can get that from bucket number by using BUCKET_TO_BLKNO.
> You can get bucket number from page's opaque data.  So, if we follow
> that then you can have a prototype of a function as
> hash_bitmap_info(index_oid, page bytea) which will be quite similar to
> other API's exposed by this module.
>

AFAIU, BUCKET_TO_BLKNO will give us the block number of a primary
bucket page rather than overflow page and what we want is an overflow
block number so as to determine the overflow bit number which can be
used further to identify the bitmap page. If we pass overflow page as
an input to hash_bitmap_info() we won't be able to get it's block
number. Considering above facts, I think we need to input overflow
block number rather than overflow page to hash_bitmap_info(). Please
let me know your opinion on this. Thanks.



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless)
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] contrib modules and relkind check