From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | A strange GiST error message or fillfactor of GiST build |
Date: | 2018-08-29 08:32:52 |
Message-ID: | 20180829.173252.156233206.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.)
> ERROR: index row size 8016 exceeds maximum 7333 for index "y_cube_idx"
I'm not sure why 277807bd9e didn't do that completely so I may be
missing something. Is there any thoughts?
There's another issue that ununderstandable message is issued
when (the root) page cannot store two tuples. I'll send a fix for
that sooner if no one objects to check it separately.
> =# create table y as select cube(array(SELECT random() as a FROM generate_series(1,900))) from generate_series(1,1e3,1);
> =# create index on y using gist (cube);
> ERROR: failed to add item to index page in "y_cube_idx"
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
GiST_consider_fillfactor.patch | text/x-patch | 4.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-08-29 08:37:30 | Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes |
Previous Message | Daniel Gustafsson | 2018-08-29 08:28:33 | Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option) |