Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebtLr-0004An-Mg for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Jan 2018 19:26:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebtLr-0005wP-8h for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Jan 2018 19:26:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ebtLq-0005wG-Vh for pgsql-bugs@lists.postgresql.org; Wed, 17 Jan 2018 19:26:23 +0000 Received: from forward106p.mail.yandex.net ([2a02:6b8:0:1472:2741:0:8b7:109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ebtLn-0006Xn-UE for pgsql-bugs@lists.postgresql.org; Wed, 17 Jan 2018 19:26:22 +0000 Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward106p.mail.yandex.net (Yandex) with ESMTP id F04AF2D84C53; Wed, 17 Jan 2018 22:26:16 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id nMM0Wf0Czh-QFH48PlA; Wed, 17 Jan 2018 22:26:16 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1516217176; bh=4f+MEiJXi+650tyT+hGRZkcpm9C3xG0hk7zdcowiPjo=; h=From:To:In-Reply-To:References:Subject:Message-Id:Date; b=AKPuSNt3MpxcL6WEJEzvbNvlJialpee9QzQmQLrJ5UqavW7odayfExX2lPg4Hndvr O62ARYp/49uM/PS/bKu7rkB7fj1pUYU1TisRIl23yuJFG5uu09z8LkY77P176XN+Pd psh3FYJYKdIgvcYH7KRA4X180GqDY7/2tAXAlW/0= Authentication-Results: mxback8j.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by web38o.yandex.ru with HTTP; Wed, 17 Jan 2018 22:26:15 +0300 From: Sergei Kornilov To: David Pereiro Lagares , "pgsql-bugs@lists.postgresql.org" In-Reply-To: <1516210494.1798.16.camel@nlpgo.com> References: <1516210494.1798.16.camel@nlpgo.com> Subject: Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column. MIME-Version: 1.0 Message-Id: <412861516217175@web38o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Wed, 17 Jan 2018 22:26:15 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello I can reproduce on actual 9.6.6, 10.1 and fresh master build (9c7d06d60680c7f00d931233873dee81fdb311c6 commit). I did not check earlier versions set enable_indexonlyscan to off ; postgres=# SELECT w FROM words WHERE w LIKE '%e%'; w ------- Lorem Index scan result is correct. Affected only index only scan, PS: i find GIST(w gist_trgm_ops, w); some strange idea, but result is incorrect in any case. best regards, Sergei