From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Subject: | Lossy bitmap scan is broken in GIN |
Date: | 2014-05-10 19:41:25 |
Message-ID: | CAPpHfdv=OFLSPDDhy89+B0whXZdsU9PsueGNvNhV7CnAVakpQA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hackers,
GIN hangs on lossy bitmap scan. Here is test case:
create extension btree_gin;
create table test as (select random() v from generate_series(1,1000000));
create index test_idx on test using gin(v);
set work_mem = '16MB';
select count(*) from test where v > 0.9;
count
───────
99916
(1 row)
Time: 63,142 ms
set work_mem = '64kB';
select count(*) from test where v > 0.9;
The last query hangs. I've debugged it. It's another bug in this "cursed"
loop in entryGetItem. Fix is attached.
------
With best regards,
Alexander Korotkov.
Attachment | Content-Type | Size |
---|---|---|
gin_lossy_bitmap_fix.patch | application/octet-stream | 939 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2014-05-10 20:02:39 | Re: [v9.5] Custom Plan API |
Previous Message | Joni Martikainen | 2014-05-10 18:24:21 | Select queries which violates table constrains |