Re: pageinspect: Hash index support
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>,
Michael Paquier <michael.paquier@gmail.com>,
Ashutosh Sharma <ashu.coek88@gmail.com>, Jeff Janes <jeff.janes@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2016-09-23T12:41:38Z
Lists: pgsql-hackers
On 9/23/16 1:56 AM, Amit Kapila wrote:
> On Fri, Sep 23, 2016 at 9:40 AM, Peter Eisentraut
>> - hash_metap result fields spares and mapp should be arrays of integer.
>>
>
> how would you like to see both those arrays in tuple, right now, I
> think Jesper's code is showing it as string.
I'm not sure what you are asking here.
>> (Incidentally, the comment in hash.h talks about bitmaps[] but I think
>> it means hashm_mapp[].)
>>
>
> which comment are you referring here? hashm_mapp contains block
> numbers of bitmap pages.
The comment I'm referring to says
The blknos of these bitmap pages are kept in bitmaps[]; nmaps is the
number of currently existing bitmaps.
But there is no "bitmaps" field anywhere.
> In the above code, it appears that you are trying to calculate
> max_avail space for all pages in same way. Don't you need to
> calculate it differently for bitmap page or meta page as they don't
> share the same format as other type of pages?
Is this even useful for hash indexes? This idea came from btrees.
Neither the gin nor the brin code have this.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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