Re: pageinspect: Hash index support
Jesper Pedersen <jesper.pedersen@redhat.com>
From: Jesper Pedersen <jesper.pedersen@redhat.com>
To: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: 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-04T13:40:04Z
Lists: pgsql-hackers
Attachments
Hi Ashutosh,
On 12/20/2016 05:55 AM, Ashutosh Sharma wrote:
> 1) It introduces two new functions hash_page_type() and
> hash_bitmap_info(). hash_page_type basically displays the type of hash
> page whereas hash_bitmap_info() shows the status of a bit for a
> particular overflow page in bitmap page of hash index.
>
> 2) The functions hash_page_stats() and hash_page_items() basically
> shows the information about data stored in bucket and overflow pages
> of hash index. If a metapage or bitmap page is passed as an input to
> this function it throws an error saying "Expected page type:'' got:
> ''".
>
> 3) It also improves verify_hash_page() function to handle any type of
> page in hash index. It is now being used as
> verify_hash_page('raw_page', <page_type>) to verify if the page passed
> to this function is of 'page_type' or not. Here page_type can be
> LH_META_PAGE, LH_BUCKET_PAGE, LH_OVERFLOW_PAGE, LH_BITMAP_PAGE.
>
Here is an updated patch with some changes.
* Rename convert_ovflblkno_to_bitno to _hash_ovflblkno_to_bitno
Such that there is only 1 method, which is exposed
* Readded pageinspect--1.6.sql
In order to have the latest pageinspect interface in 1 file, as we need
something to install from.
Removing --1.5.sql otherwise would give
test=# CREATE EXTENSION "pageinspect";
ERROR: extension "pageinspect" has no installation script nor update
path for version "1.6"
* Minor documentation changes
Look it over, and maybe there is a simple test case we can add for this.
Best regards,
Jesper
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