Re: pageinspect: Hash index support

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pageinspect: Hash index support
Date: 2017-02-03 16:41:05
Message-ID: 095699f0-22f2-49fe-672b-b746f3219120@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 02/03/2017 11:36 AM, Robert Haas wrote:
> On Fri, Feb 3, 2017 at 10:11 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> BTW, the buildfarm is still crashing on ia64 and sparc64 members.
>> I believe this is the same problem addressed in 84ad68d64 for
>> pageinspect's GIN functions, to wit, the payload of a "bytea"
>> is not maxaligned, so machines that care about alignment won't be
>> happy when trying to fetch 64-bit values out of a bytea page image.
>>
>> Clearly, the fix should be to start using the get_page_from_raw()
>> function that Peter introduced in that patch. But it's static in
>> ginfuncs.c, which I thought was a mistake at the time, and it's
>> proven so now.
>>
>> contrib/pageinspect actually seems to lack *any* infrastructure
>> for sharing functions across modules. It's time to remedy that.
>> I propose inventing "pageinspect.h" to hold commonly visible
>> declarations, and moving get_page_from_raw() into rawpage.c,
>> which seems like a reasonably natural home for it. (Alternatively,
>> we could invent a pageinspect.c file to hold utility functions,
>> but that might be overkill.)
>
> No objections.
>

Attached is v1 of this w/ verify_hash_page() using get_page_from_raw().

Sorry for all the problems.

Best regards,
Jesper

Attachment Content-Type Size
0001-Add-pageinspect.h_v1.patch text/x-patch 5.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jesper Pedersen 2017-02-03 16:49:09 Re: pageinspect: Hash index support
Previous Message Fabien COELHO 2017-02-03 16:38:30 Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)