Re: pageinspect: Hash index support
Ashutosh Sharma <ashu.coek88@gmail.com>
From: Ashutosh Sharma <ashu.coek88@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Jesper Pedersen <jesper.pedersen@redhat.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-24T06:11:52Z
Lists: 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.
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