Re: pageinspect patch, for showing tuple data

From: Nikolay Shaplov <n(dot)shaplov(at)postgrespro(dot)ru>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pageinspect patch, for showing tuple data
Date: 2015-09-18 15:19:26
Message-ID: 1823336.cL3IICMDIk@nataraj-amd64
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
pageinspect_show_tuple_data_v4a.diff text/x-patch 22.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-09-18 15:45:05 Re: Parallel Seq Scan
Previous Message Tom Lane 2015-09-18 14:47:19 Re: [COMMITTERS] pgsql: Fix an O(N^2) problem in foreign key references.