Re: [HACKERS] wrong t_bits alignment in pageinspect

x4mmm@yandex-team.ru

From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Maksim Milyutin <milyutinma@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2018-01-02T09:33:57Z
Lists: pgsql-hackers
Hi!
> 15 дек. 2017 г., в 18:53, Maksim Milyutin <milyutinma@gmail.com> написал(а):
> 
> I found out the problem in exposing values of t_bits field from heap_page_items function.

Probably, this [0] place contains similar bug too?
Also, may be macro HeapTupleHeaderGetNatts() will be a little bit easier to read.

Best regards, Andrey Borodin.

[0] https://github.com/postgres/postgres/blob/master/contrib/pageinspect/heapfuncs.c#L439

Commits

  1. Fix new test case to not be endian-dependent.

  2. Fix incorrect computations of length of null bitmap in pageinspect.