Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.

Sergei Kornilov <sk@zsrv.org>

From: Sergei Kornilov <sk@zsrv.org>
To: David Pereiro Lagares <david@nlpgo.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2018-01-17T19:26:15Z
Lists: pgsql-bugs, pgsql-hackers
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


Commits

  1. Improve stability of recently-added regression test case.

  2. Fix IOS planning when only some index columns can return an attribute.

  3. Ability to advance replication slots

  4. Allow no-op GiST support functions to be omitted.