From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Subject: | Re: Partial match fix for fast scan |
Date: | 2014-04-10 16:22:29 |
Message-ID: | CAFcNs+q=1JiHihBkq-VtQHWBTyxuRdB=iz2VLC-6LmQ2ifizPg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Apr 10, 2014 at 11:09 AM, Alexander Korotkov
<aekorotkov(at)gmail(dot)com>wrote:
> Hi,
>
> GIN partial match appears to be broken after fast scan. Following simple
> test case raises assertion failure.
>
> create extension btree_gin;
> create table test as (select id, random() as val from
> generate_series(1,1000000) id);
> create index test_idx on test using gin (val);
> vacuum test;
> select * from test where val between 0.1 and 0.9;
>
> Attached patch fixes bugs in entryGetItem function.
> I would especially point that "continue;" checks "while" condition even if
> it's postfix "while". That's why I surrounded tbm_iterate with another
> "while".
>
>
Interesting... to me (using current master) your test case doesn't fail...
fabrizio=# select * from test where val between 0.1 and 0.9;
id | val
--------+-------------------
1 | 0.554413774050772
2 | 0.767866868525743
3 | 0.601187175605446
...
But fail if I change the values of between clause:
fabrizio=# select * from test where val between 0.1 and 0.19;
ERROR: tuple offset out of range: 8080
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-04-10 16:23:40 | Re: psql \d+ and oid display |
Previous Message | Greg Stark | 2014-04-10 14:45:27 | Re: Problem with displaying "wide" tables in psql |