Re: Assert in pageinspect with NULL pages

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Assert in pageinspect with NULL pages
Дата
Msg-id CAH2-WzkOHbSpW=Gs7eZ1CBKNATjMAczktTt=yGqhw9nbPd27sg@mail.gmail.com
обсуждение исходный текст
Ответ на Assert in pageinspect with NULL pages  (Daria Lepikhova <d.lepikhova@postgrespro.ru>)
Ответы Re: Assert in pageinspect with NULL pages  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Wed, Mar 23, 2022 at 1:16 AM Michael Paquier <michael@paquier.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Corruption during WAL replay
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: A test for replay of regression tests