Partial match fix for fast scan - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Partial match fix for fast scan
Date
Msg-id CAPpHfduF=hDiO0Nokpe184PCJoiBSRzZK2DNG2rLOp6RAzv6Dg@mail.gmail.com
Whole thread Raw
Responses Re: Partial match fix for fast scan
List pgsql-hackers
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".

------
With best regards,
Alexander Korotkov.
Attachment

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Adding unsigned 256 bit integers
Next
From: "ktm@rice.edu"
Date:
Subject: Re: Adding unsigned 256 bit integers