Re: [PATCH] pageinspect function to decode infomasks

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Álvaro Herrera <alvherre(at)2ndquadrant(dot)com>, abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)2ndquadrant(dot)com>
Subject: Re: [PATCH] pageinspect function to decode infomasks
Date: 2017-07-20 06:26:53
Message-ID: CAD21AoA3-H0C9Tek9CTBj0+QHiDQjG6ouw8Vep75prau8i9VhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 20, 2017 at 3:13 PM, Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
> On Thu, Jul 20, 2017 at 5:44 AM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>> On Wed, Jul 19, 2017 at 8:33 PM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
>>> That's silly, so here's a patch to teach pageinspect how to decode infomasks
>>> to a human readable array of flag names.
>>>
>>> Example:
>>>
>>> SELECT t_infomask, t_infomask2, flags
>>> FROM heap_page_items(get_raw_page('test1', 0)),
>>> LATERAL heap_infomask_flags(t_infomask, t_infomask2, true) m(flags);
>>> t_infomask | t_infomask2 | flags
>>> ------------+-------------+----------------------------------------------------------------------------
>>> 2816 | 2 |
>>> {HEAP_XMIN_COMMITTED,HEAP_XMIN_INVALID,HEAP_XMAX_INVALID,HEAP_XMIN_FROZEN}
>>> (1 row)
>>
>> Seems like a good idea to me.
>>
>
> +1, it'll be really helpful.
>

+1.
When I investigated data corruption incident I also wrote a plpgsql
function for the same purpose, and it was very useful. I think we can
have the similar thing for lp_flags as well.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neha Sharma 2017-07-20 07:00:46 Re: [TRAP: FailedAssertion] causing server to crash
Previous Message Kyotaro HORIGUCHI 2017-07-20 06:25:33 Re: PgFDW connection invalidation by ALTER SERVER/ALTER USER MAPPING