Re: About limit on cube dimensions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: About limit on cube dimensions
Дата
Msg-id 19659.1409523037@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: About limit on cube dimensions  (David G Johnston <david.g.johnston@gmail.com>)
Список pgsql-general
David G Johnston <david.g.johnston@gmail.com> writes:
> Shida Sato wrote
>> Why is there limit on the number of cube dimensions?

>> From the docs: http://www.postgresql.org/docs/9.4/static/cube.html
> "To make it harder for people to break things, there is a limit of 100 on
> the number of dimensions of cubes. This is set in cubedata.h if you need
> something bigger."

> Thus the limit is indeed arbitrary - though if you decide to recompile to
> increase that limit your expectations should be sufficient tempered since
> likely few (if any) people are using cubes with 100 times the default limit
> number of dimensions.

Just offhand, it seems like that limit is doing a couple of things:

* Protecting against overflow in memory allocation requests.  In theory
we could raise the limit to something near MaxAllocSize/(sizeof(double)*2)
without breaking this.

* Protecting against locking up the server if there are slow (O(N^2) or
worse) algorithms in any of the cube functions.

Before considering a proposal to raise the default value I'd want to see
some investigation of the second point.

            regards, tom lane


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

Предыдущее
От: David G Johnston
Дата:
Сообщение: Re: About limit on cube dimensions
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: About limit on cube dimensions