If the block size is 32k, the function page_header of the pageinspect
module returns negative numbers:
postgres=# select * from page_header(get_raw_page('t1',0));
lsn | checksum | flags | lower | upper | special | pagesize |
version | prune_xid
-----------+----------+-------+-------+-------+---------+----------+---------+-----------
0/174CF58 | 0 | 0 | 28 | 32736 | -32768 | -32768 |
4 | 0
(1 row)
This patch changes the output parameters lower, upper, special and
pagesize to int32.
postgres=# select * from page_header(get_raw_page('t1',0));
lsn | checksum | flags | lower | upper | special | pagesize |
version | prune_xid
-----------+----------+-------+-------+-------+---------+----------+---------+-----------
0/19EA640 | 0 | 0 | 28 | 32736 | 32768 | 32768 |
4 | 0
(1 row)
--
Quan Zongliang