Re: page macros cleanup

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: page macros cleanup
Дата
Msg-id 486E01B0.9050100@enterprisedb.com
обсуждение исходный текст
Ответ на Re: page macros cleanup  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Ответы Re: page macros cleanup  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Re: page macros cleanup  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Список pgsql-patches
Pavan Deolasee wrote:
> On Fri, Jul 4, 2008 at 3:37 PM, Heikki Linnakangas
> <heikki@enterprisedb.com> wrote:
>>
>> I think this is the way it should be:
>>
>> #define HashMaxItemSize \
>>        (BLCKSZ - \
>>         SizeOfPageHeaderData - \
>>         MAXALIGN(sizeof(HashPageOpaqueData)) - \
>>         sizeof(ItemIdData))
>>
>
> I am wondering if this would fail for corner case if HashMaxItemSize
> happened to be unaligned. For example, if (itemsz < HashMaxItemSize <
> MAXALIGN(itemsz), PageAddItem() would later fail with a not-so-obvious
> error. Should we just MAXALIGN_DOWN the HashMaxItemSize ?

No, there's a itemsz = MAXALIGN(itemsz) call before the check against
HashMaxItemSize.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

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

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: page macros cleanup
Следующее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: page macros cleanup