Fix bug where GIN scan keys were not initialized with gin_fuzzy_search_limit.
Fix bug where GIN scan keys were not initialized with gin_fuzzy_search_limit.

When gin_fuzzy_search_limit was used, we could jump out of startScan()
without calling startScanKey(). That was harmless in 9.3 and below, because
startScanKey()() didn't do anything interesting, but in 9.4 it initializes
information needed for skipping entries (aka GIN fast scans), and you
readily get a segfault if it's not done. Nevertheless, it was clearly wrong
all along, so backpatch all the way to 9.1 where the early return was
introduced.

(AFAICS startScanKey() did nothing useful in 9.3 and below, because the
fields it initialized were already initialized in ginFillScanKey(), but I
don't dare to change that in a minor release. ginFillScanKey() is always
called in gingetbitmap() even though there's a check there to see if the
scan keys have already been initialized, because they never are; ginrescan()
free's them.)

In the passing, remove unnecessary if-check from the second inner loop in
startScan(). We already check in the first loop that the condition is true
for all entries.

Reported by Olaf Gawenda, bug #12694, Backpatch to 9.1 and above, although
AFAICS it causes a live bug only in 9.4.

zeroae/postgres-xl,Postgres-XL/Postgres-XL,adam8157/gpdb,50wu/gpdb,oberstet/postgres-xl,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,adam8157/gpdb,yazun/postgres-xl,yazun/postgres-xl,50wu/gpdb,lisakowen/gpdb,ovr/postgres-xl,Postgres-XL/Postgres-XL,ashwinstar/gpdb,lisakowen/gpdb,xinzweb/gpdb,lisakowen/gpdb,oberstet/postgres-xl,oberstet/postgres-xl,ashwinstar/gpdb,lisakowen/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,techdragon/Postgres-XL,50wu/gpdb,xinzweb/gpdb,ovr/postgres-xl,jmcatamney/gpdb,ashwinstar/gpdb,adam8157/gpdb,greenplum-db/gpdb,xinzweb/gpdb,50wu/gpdb,yazun/postgres-xl,xinzweb/gpdb,jmcatamney/gpdb,ovr/postgres-xl,lisakowen/gpdb,yazun/postgres-xl,greenplum-db/gpdb,zeroae/postgres-xl,xinzweb/gpdb,pavanvd/postgres-xl,xinzweb/gpdb,jmcatamney/gpdb,50wu/gpdb,xinzweb/gpdb,pavanvd/postgres-xl,techdragon/Postgres-XL,ashwinstar/gpdb,50wu/gpdb,techdragon/Postgres-XL,adam8157/gpdb,adam8157/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,50wu/gpdb,pavanvd/postgres-xl,techdragon/Postgres-XL,jmcatamney/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,ovr/postgres-xl,oberstet/postgres-xl,zeroae/postgres-xl,ashwinstar/gpdb,zeroae/postgres-xl,ashwinstar/gpdb,oberstet/postgres-xl,lisakowen/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,ashwinstar/gpdb,adam8157/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,ovr/postgres-xl,pavanvd/postgres-xl,pavanvd/postgres-xl,yazun/postgres-xl,greenplum-db/gpdb,Postgres-XL/Postgres-XL,zeroae/postgres-xl