Re: [SQL] RewriteDefine.c : Rule size

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] RewriteDefine.c : Rule size
Дата
Msg-id 2314.931530245@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] RewriteDefine.c : Rule size  (Jim Rowan <jmr@computing.com>)
Ответы Re: [SQL] RewriteDefine.c : Rule size  (Bruce Momjian <maillist@candle.pha.pa.us>)
Re: [SQL] RewriteDefine.c : Rule size  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-sql
Jim Rowan <jmr@computing.com> writes:
> First we multiplied it * 4.  This improved the ability to handle complex
> rules, but didn't go far enough... (it still wouldn't handle all of what we
> wanted it to). 

> So we multiplied it * 8.  Initdb complained about "float4 not
> defined".

There is a poorly-documented restriction that BLCKSZ can't exceed 32K
(IIRC, this is because block offsets are stored in signed shorts somewhere).
Probably would be a good idea to mention this in the comments in
config.h.in.

For the long run it would be nice to remove the restriction.  I have no
idea whether that would be easy or hard.  Ideally we could do something
like

#if BLCKSZ > 32767typedef int BlockOffset;
#elsetypedef short BlockOffset;
#endif

but finding all the places that need to use the typedef might be a pain.
        regards, tom lane


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

Предыдущее
От: "John Ridout"
Дата:
Сообщение: RE: [SQL] Good Optimization
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [SQL] Good Optimization