Re: Assert in pageinspect with NULL pages

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Daria Lepikhova <d.lepikhova@postgrespro.ru>
Cc: pgsql-hackers@postgresql.org
Date: 2022-02-17T08:57:49Z
Lists: pgsql-hackers
On Thu, Feb 17, 2022 at 01:46:40PM +0500, Daria Lepikhova wrote:
> INSERT INTO test1(y) SELECT 0 FROM generate_series(1,1E6) AS x;
> SELECT page_checksum(repeat(E'\\000', 8192)::bytea, 1);

Indeed.  Good catch, and that seems pretty old at quick glance for the
checksum part.  I'll try to look at all that tomorrow.
--
Michael

Commits

  1. pageinspect: Fix handling of all-zero pages

  2. pageinspect: Add more sanity checks to prevent out-of-bound reads

  3. pageinspect: Fix handling of page sizes and AM types

  4. Teach pageinspect about nbtree deduplication.