Re: pageinspect patch, for showing tuple data

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pageinspect patch, for showing tuple data
Дата
Msg-id CAB7nPqRUKC69uBaDo_pkJcBmpu+Uy1Moo=UJvXfPtv0c=-fskQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pageinspect patch, for showing tuple data  (Teodor Sigaev <teodor@sigaev.ru>)
Список 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 по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: pageinspect patch, for showing tuple data
Следующее
От: Nikolay Shaplov
Дата:
Сообщение: Re: pageinspect patch, for showing tuple data