If you have a sufficiently broken data page, pageinspect throws an
error when trying to examine the page:
ERROR: invalid memory alloc request size 18446744073709551451
This is pretty unhelpful; it would be better not to try to print the
data instead of dying. With that, at least you can know where the
problem is.
This was introduced in d6061f83a166 (2015). Proposed patch to fix it
(by having the code print a null "data" instead of dying) is attached.
--
Álvaro Herrera