Re: new heapcheck contrib module

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: new heapcheck contrib module
Дата
Msg-id CAH2-Wz=PVfzuwXO_yPbaj6DMZ214v6EBL_sxd2psedUwXPyU_w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: new heapcheck contrib module  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Oct 23, 2020 at 11:51 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>             /* Set up context information about this next tuple */
>             ctx.lp_len = ItemIdGetLength(ctx.itemid);
>             ctx.tuphdr = (HeapTupleHeader) PageGetItem(ctx.page, ctx.itemid);
>             ctx.natts = HeapTupleHeaderGetNatts(ctx.tuphdr);
>
> with absolutely no thought for the possibility that lp_off is out of
> range or not maxaligned.  The checks for a sane lp_len seem to have
> gone missing as well.

That is surprising. verify_nbtree.c has PageGetItemIdCareful() for
this exact reason.

-- 
Peter Geoghegan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: new heapcheck contrib module
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [doc] remove reference to pg_dump pre-8.1 switch behaviour