Hi!

create table xxx ( t text);

insert into xxx select 'x' || v::text from generate_series(1, 291) as v;
insert into xxx  values ('');

create index xxxidx on xxx using spgist (t);

And postgres will eat memory forever. It seems to me that checkAllTheSame wrongly decides that all tuples are the same. All tuples except tuple to be inserted have the same character 'x' and only new tuple has '\0'. But checkAllTheSame() removes new tuple because set of tuples is too big to fit page and founds that all tuples are the same. Patch attached, suppose, all branches with spgist should be fixed.

Original data is too big to send in e-mail list or even send link, and the bug caused not in root page as in example above.




--
Teodor Sigaev                                   E-mail: teo...@sigaev.ru
                                                   WWW: http://www.sigaev.ru/

Attachment: spgist_allthesame.patch.gz
Description: Unix tar archive

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to