Re: pageinspect: Hash index support
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: Jeff Janes <jeff.janes@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2016-09-20T07:19:53Z
Lists: pgsql-hackers
On Tue, Sep 20, 2016 at 1:11 AM, Jesper Pedersen <jesper.pedersen@redhat.com> wrote: > This version adds the overloaded get_raw_page based methods. However, I'm > not verifying the page other than page_id, as hasho_flag can contain > multiple flags in Amit's patches. And, I don't see having different page ids > as a benefit - at least not part of this patch. > > We should probably just have one of the method sets, so I'll send a v3 with > the set voted for. > > I kept the 'data' field as is, for now. $ git diff master --check contrib/pageinspect/hashfuncs.c:758: space before tab in indent. + values); That's always good to run to check the format of a patch before sending it. You did not get right the comments from Alvaro upthread. The following functions are added with this patch: function hash_metap(text) function hash_metap_bytea(bytea) function hash_page_items(text,integer) function hash_page_items_bytea(bytea) function hash_page_stats(text,integer) function hash_page_stats_bytea(bytea,integer) Now the following set of functions would be sufficient: function hash_metapage_info(bytea) function hash_page_items(bytea) function hash_page_stats(bytea) The last time pageinspect has been updated, when BRIN functions have been added, it has been discussed to just use (bytea) as an argument interface and just rely on get_raw_page() to get the pages wanted, so I think that we had better stick with that and keep things simple. Note: the patch checks if a superuser is calling the new functions, which is a good thing. I am switching the patch back to "waiting on author". As far as I can see the patch is in rather good shape, you just need to adapt the docs and shave all the parts that are not needed for the final result. -- Michael
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