Re: pageinspect: Hash index support

Поиск
Список
Период
Сортировка
От Jesper Pedersen
Тема Re: pageinspect: Hash index support
Дата
Msg-id 91ef3f46-4180-13e1-eb33-eb3eac10307f@redhat.com
обсуждение исходный текст
Ответ на Re: pageinspect: Hash index support  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On 09/23/2016 01:56 AM, Amit Kapila wrote:
> While looking at patch, I noticed below code which seems somewhat problematic:
>
> + stat->max_avail = BLCKSZ - (BLCKSZ - phdr->pd_special + SizeOfPageHeaderData);
> +
> + /* page type (flags) */
> + if (opaque->hasho_flag & LH_META_PAGE)
> + stat->type = 'm';
> + else if (opaque->hasho_flag & LH_OVERFLOW_PAGE)
> + stat->type = 'v';
> + else if (opaque->hasho_flag & LH_BUCKET_PAGE)
> + stat->type = 'b';
> + else if (opaque->hasho_flag & LH_BITMAP_PAGE)
> + stat->type = 'i';
>
> In the above code, it appears that you are trying to calculate
> max_avail space for all pages in same way.  Don't you need to
> calculate it differently for bitmap page or meta page as they don't
> share the same format as other type of pages?
>

Correct, however the max_avail calculation was removed in v6, since we 
don't display average item size anymore.

Thanks for the feedback !

Best regards, Jesper




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

Предыдущее
От: Jesper Pedersen
Дата:
Сообщение: Re: pageinspect: Hash index support
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] pgpassfile connection option