Re: pageinspect: Hash index support

Jesper Pedersen <jesper.pedersen@redhat.com>

From: Jesper Pedersen <jesper.pedersen@redhat.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2016-09-21T12:27:06Z
Lists: pgsql-hackers
On 09/21/2016 02:14 AM, Michael Paquier wrote:
>> Adjusted in v4.
>
> Thanks for the new version.
>
>> Code/doc will need an update once the CHI patch goes in.
>
> If you are referring to the WAL support, I guess that this patch or
> the other patch could just rebase and adjust as needed.
>

It is the main patch [1] that defines the new constants for page type. 
But I'll submit an update for pageinspect when needed.

> hash_page_items and hash_page_stats share a lot of common points with
> their btree equivalents, still doing a refactoring would just impact
> the visibility of the code, and it is wanted as educational in this
> module, so let's go with things the way you suggest.
>

Ok.

> +     <para>
> +      The type information will be '<literal>m</literal>' for a metadata page,
> +      '<literal>v</literal>' for an overflow page,
> '<literal>b</literal>' for a bucket page,
> +      '<literal>i</literal>' for a bitmap page, and
> '<literal>u</literal>' for an unused page.
> +     </para>
> Other functions don't go into this level of details, so I would just
> rip out this paragraph.
>

I'll add an annotation for this part, and leave it for the committer to 
decide, since Jeff wanted documentation for the 'type' information.

> The patch looks in pretty good shape to me, so I am switching it as
> ready for committer.
>

Thanks for your feedback !

Best regards,
  Jesper



Commits

  1. Fix incorrect typecast.

  2. In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines.

  3. pageinspect: Support hash indexes.

  4. Add uuid to the set of types supported by contrib/btree_gist.

  5. Allow CREATE EXTENSION to follow extension update paths.