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

From Michael Paquier
Subject Re: pageinspect patch, for showing tuple data
Date
Msg-id CAB7nPqRUKC69uBaDo_pkJcBmpu+Uy1Moo=UJvXfPtv0c=-fskQ@mail.gmail.com
Whole thread Raw
In response to Re: pageinspect patch, for showing tuple data  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers


On Wed, Nov 25, 2015 at 10:06 PM, Teodor Sigaev <teodor@sigaev.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

pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: pageinspect patch, for showing tuple data
Next
From: Nikolay Shaplov
Date:
Subject: Re: pageinspect patch, for showing tuple data