Hi!
> 29 авг. 2018 г., в 5:32, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> написал(а):
>
> Hello.
>
> In the discussion about cube's dimention limit [1], I found that
> the error messages looks strange.
>
> https://www.postgresql.org/message-id/F0E1A404-A495-4F38-B817-06355B537E88@yandex-team.ru
>
>> postgres=# create table y as select cube(array(SELECT random() as a FROM generate_series(1,1000))) from
generate_series(1,1e3,1);
>> SELECT 1000
>> postgres=# create index on y using gist(cube );
>> ERROR: index row size 8016 exceeds maximum 8152 for index "y_cube_idx"
>
> This is apparently strange. This is because the message doesn't
> count fill factor at the time. It is fixed by passing freespace
> to gistSplit() and that allows gistfitpage() to consider
> fillfactor as TODO comment within.
>
> After the attached patch applied, the above messages becomes as
> follows. (And index can be built being a bit sparse by fill
> factor.)
We are passing freespace everywhere. Also, we pass GistInsertState, and GistState.
Maybe let's put GistState into GistInsertState, GistState already has free space, and pass just GistInsertState
everywhere?
Best regards, Andrey Borodin.