Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea) - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea)
Date
Msg-id eec924a9-aed3-9349-e821-68362a1b4b31@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] PATCH: pageinspect / add page_checksum and bt_page_items(bytea)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea)  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea)  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea)  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On 03/03/2017 05:09 AM, Robert Haas wrote:
> On Mon, Feb 20, 2017 at 9:43 PM, Tomas Vondra
> <tomas.vondra@2ndquadrant.com> wrote:
>> BTW I've noticed the pageinspect version is 1.6, but we only have
>> pageinspect--1.5.sql (and upgrade script to 1.6). Not sure that's entirely
>> intentional?
>
> Actually, that's the New Way.  See 40b449ae84dcf71177d7749a7b0c582b64dc15f0.
>

Ah, great! Didn't notice that change.

> +extern Datum bt_metap(PG_FUNCTION_ARGS);
> +extern Datum bt_page_items(PG_FUNCTION_ARGS);
> +extern Datum bt_page_items_bytea(PG_FUNCTION_ARGS);
> +extern Datum bt_page_stats(PG_FUNCTION_ARGS);
>
> Not needed.  PG_FUNCTION_INFO_V1 now does it.

OK.

>
> -    ...
>
> This does not seem like a good idea in any way, and the patch has
> several instances of it.
>

Damn. In my defense, the patch was originally created for an older 
PostgreSQL version (to investigate issue on a production system), which 
used that approach to building values. Should have notice it, though.

Attached is v2, fixing both issues.

regard

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: [HACKERS] Block level parallel vacuum WIP
Next
From: Stephen Frost
Date:
Subject: Re: [HACKERS] logical replication access control patches