Re: Utilisation of get_page_from_raw() in pageinspect

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Utilisation of get_page_from_raw() in pageinspect
Date: 2018-06-29 16:15:57
Message-ID: aa1417bb-20b3-2200-cd76-bfe33d324fa8@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Ashutosh,

On 06/27/2018 05:01 AM, Ashutosh Sharma wrote:
> Currently, get_page_from_raw() is not used in the pageinspect
> functions for btree and heap to fetch a page image from raw page.
> However, the pageinspect for gin and hash is using it to avoid server
> crash on alignment picky machines with MAXALIGN = 8. Shouldn't we
> start using it in the pageinspect functions for btree and heap as well
> for safety purpose. Thoughts?
>

Although it is assumed that the functions are called using
get_page_from_raw(), as shown by Peter's tests in adfb81d9e1d, I think
it couldn't hurt to add an extra check, like in bt_page_items_bytea()
and heap_page_items().

I can help with a review.

Best regards,
Jesper

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-06-29 16:44:10 Re: CREATE TABLE .. LIKE .. EXCLUDING documentation
Previous Message Alvaro Herrera 2018-06-29 16:06:51 Re: Listing triggers in partitions (was Re: Remove mention in docs that foreign keys on partitioned tables)