SP-GiST bug. - Mailing list pgsql-hackers

From Teodor Sigaev
Subject SP-GiST bug.
Date
Msg-id 537BE1A9.1050006@sigaev.ru
Whole thread Raw
Responses Re: SP-GiST bug.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: jsonb inequality operators
Next
From: Peter Geoghegan
Date:
Subject: Re: jsonb failed assertions