Re: A strange GiST error message or fillfactor of GiST build

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: A strange GiST error message or fillfactor of GiST build
Date: 2018-08-29 13:42:59
Message-ID: 6FBE12B2-4F59-4DB9-BDE9-62C8801189A8@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

> 29 авг. 2018 г., в 5:32, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2018-08-29 14:01:49 10.5 but not 10.4: backend startup during reindex system: could not read block 0 in file "base/16400/..": read only 0 of 8192 bytes
Previous Message Peter Eisentraut 2018-08-29 13:27:00 Re: Continue work on changes to recovery.conf API