Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YGqzG-0002bm-6a for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Jan 2015 15:26:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YGqzF-0008Nm-MK for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Jan 2015 15:26:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YGqzE-0008NQ-LX for pgsql-bugs@postgresql.org; Thu, 29 Jan 2015 15:26:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YGqzB-0005qF-EW for pgsql-bugs@postgresql.org; Thu, 29 Jan 2015 15:26:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t0TFQHi3004774; Thu, 29 Jan 2015 10:26:18 -0500 From: Tom Lane To: Heikki Linnakangas cc: Michael Paquier , olaf.gw@googlemail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit In-reply-to: <54CA3EB5.3030804@vmware.com> References: <20150128181243.2579.80775@wrigleys.postgresql.org> <54CA3EB5.3030804@vmware.com> Comments: In-reply-to Heikki Linnakangas message dated "Thu, 29 Jan 2015 16:07:49 +0200" Date: Thu, 29 Jan 2015 10:26:17 -0500 Message-ID: <4773.1422545177@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Heikki Linnakangas 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs