From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Alexander Lakhin <exclusion(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Daria Lepikhova <d(dot)lepikhova(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Assert in pageinspect with NULL pages |
Date: | 2022-03-25 03:54:14 |
Message-ID: | CAH2-WzkOHbSpW=Gs7eZ1CBKNATjMAczktTt=yGqhw9nbPd27sg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 23, 2022 at 1:16 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> As far as I can see, this is
> also possible in bt_page_items_bytea(), gist_page_opaque_info(),
> gin_metapage_info() and gin_page_opaque_info(). All those code paths
> should be protected with some checks on PageGetSpecialSize(), I
> guess, before attempting to read the special area of the page. Hash
> indexes are protected by checking the expected size of the special
> area, and one code path of btree relies on the opened relation to be a
> btree index.
amcheck's palloc_btree_page() function validates that an 8KiB page is
in fact an nbtree page, in a maximally paranoid way. Might be an
example worth following here.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2022-03-25 03:55:27 | Re: A test for replay of regression tests |
Previous Message | Andres Freund | 2022-03-25 03:43:01 | Re: Corruption during WAL replay |