Re: pageinspect patch, for showing tuple data

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Nikolay Shaplov <n(dot)shaplov(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pageinspect patch, for showing tuple data
Date: 2015-11-25 13:13:26
Message-ID: CAB7nPqRUKC69uBaDo_pkJcBmpu+Uy1Moo=UJvXfPtv0c=-fskQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 25, 2015 at 10:06 PM, Teodor Sigaev <teodor(at)sigaev(dot)ru> wrote:

> - bits_len = tuphdr->t_hoff -
> - offsetof(HeapTupleHeaderData, t_bits);
> + int bits_len =
> + ((tuphdr->t_infomask2 & HEAP_NATTS_MASK) / 8 +
> 1) * 8;
>
> As I understand offline comments of Nikolay, current version of page
> inspect contains an mistake here. Should we backpatch this?
>

As far as I understood from the code, the current code in pageinspect is
overestimating the length of t_bits. So that's actually harmless. For the
sake of this patch though this is needed to perform the sanity checks in
place when scanning raw page entries.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikolay Shaplov 2015-11-25 13:16:34 Re: pageinspect patch, for showing tuple data
Previous Message Teodor Sigaev 2015-11-25 13:06:11 Re: pageinspect patch, for showing tuple data