Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit
Date
Msg-id 6517.1422547480@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-bugs
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 01/29/2015 05:26 PM, Tom Lane wrote:
>> Another, even simpler fix would be to just move the startScanKey()
>> call loop to before the "if (GinFuzzySearchLimit > 0)" block.
>> Is there a particular reason why it's a good idea to do things in
>> the current order?  It almost looks like a patch application error
>> as it stands.

> The code in startScanKey() uses the predictNumberResult estimates, which
> the loop modifies, so it would change how that behaves.

Oh!  Sorry, I'd missed looking at what the qsort comparator did.

> I'm not sure if
> it would actually be better that way though; it's not clear to me how
> the fuzzy search limit should interact with the fast scan code.

Yeah, it might be better but it's not very clear what the implications
are.  Probably shouldn't touch that as part of an emergency bug fix.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit