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 4773.1422545177@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:
> The fix is simple: make sure that startScanKey() is always called, by
> getting rid of the early return above. Attached. I'll apply this later
> today or tomorrow unless someone sees a problem with this.

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.

With either fix, I concur that we should back-patch it.  It's not at all
clear how come older branches don't fail because of this.

            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