Re: Assert in pageinspect with NULL pages

Поиск
Список
Период
Сортировка
От Maxim Orlov
Тема Re: Assert in pageinspect with NULL pages
Дата
Msg-id CACG=ezZLZwOW0ESJAdBmT9t9P4qM=FOsxv1YYK-oWGL53e62ew@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Assert in pageinspect with NULL pages  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Assert in pageinspect with NULL pages  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers

I've suddenly found that the test in this patch is based on a fact that heap pages don't have PageSpecial or it is of different size with btree pages Special area:

CREATE TABLE test1 (a int8, b int4range);

SELECT bt_page_items(get_raw_page('test1', 0));


In the current state is is so, but it is not guaranteed. For example, in the proposed 64xid patch [1] we introduce PageSpecial into heap pages and its size on occasion equals to the size of btree page special so check from above is false. Even if we pass heap page into pageinspect pretending it is btree page. So the test will fail.    


Generally it seems not only a wrong test but the consequence of a bigger scale fact that we can not always distinguish different AM's pages. So I'd propose at least that we don't come to a conclusion that a page is valid based on PageSpecial size is right.

 
--
Best regards,
Maxim Orlov.

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: On login trigger: take three
Следующее
От: Robert Haas
Дата:
Сообщение: Re: multithreaded zstd backup compression for client and server