pgsql: Fix incorrect computations of length of null bitmap in pageinspe

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix incorrect computations of length of null bitmap in pageinspe
Date: 2018-01-04 19:59:13
Message-ID: E1eXBfV-0007p0-6S@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix incorrect computations of length of null bitmap in pageinspect.

Instead of using our standard macro for this calculation, this code
did it itself ... and got it wrong, leading to incorrect display of
the null bitmap in some cases. Noted and fixed by Maksim Milyutin.

In passing, remove a uselessly duplicative error check.

Errors were introduced in commit d6061f83a; back-patch to 9.6
where that came in.

Maksim Milyutin, reviewed by Andrey Borodin

Discussion: https://postgr.es/m/ec295792-a69f-350f-6287-25a20e8f31d5@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/39cfe86195f0b5cbc5fbe8d4e3aa6e2b0e322d0b

Modified Files
--------------
contrib/pageinspect/expected/page.out | 17 +++++++++++++++++
contrib/pageinspect/heapfuncs.c | 15 +++++----------
contrib/pageinspect/sql/page.sql | 8 ++++++++
3 files changed, 30 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2018-01-04 20:06:47 Re: pgsql: Add parallel-aware hash joins.
Previous Message Andres Freund 2018-01-04 19:20:33 Re: pgsql: Add parallel-aware hash joins.