Re: Assert in pageinspect with NULL pages

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Daria Lepikhova <d(dot)lepikhova(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Assert in pageinspect with NULL pages
Date: 2022-03-25 03:27:24
Message-ID: Yj02nOnWIO9+lzcl@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 25, 2022 at 11:03:47AM +0800, Julien Rouhaud wrote:
> I'm happy with all the changes, except:
>
> + if (P_ISLEAF(opaque) && opaque->btpo_level != 0)
> + ereport(ERROR,
> + (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> + errmsg("block is not a valid leaf page")));
>
> All other messages specify which kind of page it's about, so I think it would
> be better to specify "btree" leaf page here, especially since some other AMs
> also have leaf pages.

Makes sense. Fine by me to stick an extra "btree" here.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-03-25 03:43:01 Re: Corruption during WAL replay
Previous Message Amit Langote 2022-03-25 03:22:39 Re: Skip partition tuple routing with constant partition key