From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> |
Cc: | Jesper Pedersen <jesper(dot)pedersen(at)redhat(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-24 06:18:30 |
Message-ID: | CAA4eK1KDeTc8LFYXMUiDUdJtD9C9grW-TfMkvdD-t3Vyjd0PdQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 24, 2017 at 11:41 AM, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> wrote:
>>> 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.
>
Right.
> If we pass overflow page as
> an input to hash_bitmap_info() we won't be able to get it's block
> number.
>
I think we can get it by using its prev block number, but not sure if
it is worth the complexity, so let's keep the interface as proposed by
you. TBH, I am not sure how important is to expose this
(hash_bitmap_info()) function, but let's keep it and see if committer
has any opinion on this API.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Corey Huinker | 2017-01-24 06:22:53 | Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless) |
Previous Message | Fabien COELHO | 2017-01-24 06:15:29 | Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless) |