Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: olaf(dot)gw(at)googlemail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit
Date: 2015-01-29 13:09:48
Message-ID: CAB7nPqQGmwBDzX42NJPdOJ4Sgdx2PT6p8ymcTEH-+1KDiYBtCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jan 29, 2015 at 3:12 AM, <olaf(dot)gw(at)googlemail(dot)com> wrote:
> Bug reference: 12694
> Logged by: Olaf Gawenda
> Email address: olaf(dot)gw(at)googlemail(dot)com
> PostgreSQL version: 9.4.0
> Operating system: Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7
> Description:
>
> the following sequence of commands get a crash if the numer of result rows
> is lower than gin_fuzzy_search_limit:
>
> create table test (t text, ts_vec tsvector);
>
> insert into test (t) values (),(),(), ...; -- test data not posted
>
> update test set ts_vec = to_tsvector('english', t);
>
> create index on test using gin(ts_vec);
> analyze test;
> set enable_seqscan = off;
> set gin_fuzzy_search_limit = 1000;
>
> select t from test where ts_vec @@ to_tsquery('english', '...');

This can be reproduced easily with a test case like that:
create table aa as
select array[(random() * 1000000)::int,
(random() * 1000000)::int,
(random() * 1000000)::int] as a
from generate_series(1,10);
create index aai on aa using gin(a);
set gin_fuzzy_search_limit = 1;
set enable_seqscan = off;
select * from aa where a <@ array[1,2];
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2015-01-29 14:07:49 Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit
Previous Message Marko Tiikkaja 2015-01-29 09:22:00 Re: BUG #12690: EXECUTE statement fails with dynamic column name on record variable