Re: A strange GiST error message or fillfactor of GiST build - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: A strange GiST error message or fillfactor of GiST build
Date
Msg-id 6FBE12B2-4F59-4DB9-BDE9-62C8801189A8@yandex-team.ru
Whole thread Raw
In response to A strange GiST error message or fillfactor of GiST build  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: A strange GiST error message or fillfactor of GiST build
List pgsql-hackers
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.

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Continue work on changes to recovery.conf API
Next
From: Justin Pryzby
Date:
Subject: 10.5 but not 10.4: backend startup during reindex system: could notread block 0 in file "base/16400/..": read only 0 of 8192 bytes