Re: pageinspect patch, for showing tuple data - Mailing list pgsql-hackers

From Nikolay Shaplov
Subject Re: pageinspect patch, for showing tuple data
Date
Msg-id 1823336.cL3IICMDIk@nataraj-amd64
Whole thread Raw
In response to Re: pageinspect patch, for showing tuple data  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
В письме от 11 сентября 2015 15:12:04 Вы написали:

> > Ok.Let's come to the final decision with tuple_data_parse, and i will add
> > this switch there and to pure sql heap_page_item_attrs
>
> Fine for me.

So I've modified the code, now we have:

heap_page_items - have a column with raw tuple data

tuple_data_split - takes oid, raw tuple data, infomask, infomask2 and bits
parsed as string and returns bytea[] with attribute raw values. It also have
two optional arguments do_detoast that forces function to detoast attribute,
and warning_mode that allows to set this function to warning mode, and do not
stop working if some inconsistency were found.

there is also pure sql function heap_page_item_attrs that takes page data, and
table oid, and returns same data as heap_page_items but bytea[] of attributes
instead of one whole piece of raw data. It also has optional argument
do_detoast that allows to get bytea[] of detoasted attribute data.

I've decided that there is no real need in warning_mode in
heap_page_item_attrs so there is no such argument there.

So now it is still RFC. Final patch with documentation will come soon

--
Nikolay Shaplov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Fix an O(N^2) problem in foreign key references.
Next
From: Robert Haas
Date:
Subject: Re: Parallel Seq Scan