Fix an old corner-case error in match_unsorted_outer(): don't consider the cheapest-total inner path as a new candidate while truncating the sort key list, if it already matched the full sort key list.  This is too much of a corner case to be worth back-patching, since it's unusual for the cheapest total path to be sorted, and anyway no real harm is done (except in JOIN_SEMI/ANTI cases where cost_mergejoin is a bit broken at the moment).  But it wasn't behaving as intended, so fix it. Noted while examining a test case from Kevin Grittner.  This error doesn't explain his issue, but it does explain why "set enable_seqscan = off" seemed to reproduce it for me.
Fix an old corner-case error in match_unsorted_outer(): don't consider
the cheapest-total inner path as a new candidate while truncating the
sort key list, if it already matched the full sort key list.  This is
too much of a corner case to be worth back-patching, since it's unusual
for the cheapest total path to be sorted, and anyway no real harm is
done (except in JOIN_SEMI/ANTI cases where cost_mergejoin is a bit
broken at the moment).  But it wasn't behaving as intended, so fix it.
Noted while examining a test case from Kevin Grittner.  This error doesn't
explain his issue, but it does explain why "set enable_seqscan = off"
seemed to reproduce it for me.

tpostgres-projects/tPostgres,adam8157/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,50wu/gpdb,pavanvd/postgres-xl,edespino/gpdb,edespino/gpdb,50wu/gpdb,Chibin/gpdb,Chibin/gpdb,xinzweb/gpdb,snaga/postgres-xl,edespino/gpdb,Postgres-XL/Postgres-XL,zeroae/postgres-xl,jmcatamney/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,ovr/postgres-xl,arcivanov/postgres-xl,edespino/gpdb,arcivanov/postgres-xl,Chibin/gpdb,techdragon/Postgres-XL,snaga/postgres-xl,Chibin/gpdb,edespino/gpdb,oberstet/postgres-xl,zeroae/postgres-xl,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,kmjungersen/PostgresXL,ashwinstar/gpdb,oberstet/postgres-xl,Chibin/gpdb,postmind-net/postgres-xl,greenplum-db/gpdb,snaga/postgres-xl,yazun/postgres-xl,lisakowen/gpdb,lisakowen/gpdb,ashwinstar/gpdb,yuanzhao/gpdb,Postgres-XL/Postgres-XL,Chibin/gpdb,pavanvd/postgres-xl,kmjungersen/PostgresXL,ashwinstar/gpdb,techdragon/Postgres-XL,adam8157/gpdb,techdragon/Postgres-XL,edespino/gpdb,greenplum-db/gpdb,adam8157/gpdb,50wu/gpdb,ovr/postgres-xl,yuanzhao/gpdb,jmcatamney/gpdb,edespino/gpdb,50wu/gpdb,yazun/postgres-xl,lisakowen/gpdb,ovr/postgres-xl,arcivanov/postgres-xl,greenplum-db/gpdb,yuanzhao/gpdb,ovr/postgres-xl,tpostgres-projects/tPostgres,adam8157/gpdb,tpostgres-projects/tPostgres,xinzweb/gpdb,ashwinstar/gpdb,adam8157/gpdb,postmind-net/postgres-xl,Chibin/gpdb,50wu/gpdb,ashwinstar/gpdb,yazun/postgres-xl,arcivanov/postgres-xl,tpostgres-projects/tPostgres,greenplum-db/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,Postgres-XL/Postgres-XL,lisakowen/gpdb,jmcatamney/gpdb,postmind-net/postgres-xl,xinzweb/gpdb,oberstet/postgres-xl,oberstet/postgres-xl,yazun/postgres-xl,edespino/gpdb,techdragon/Postgres-XL,kmjungersen/PostgresXL,tpostgres-projects/tPostgres,xinzweb/gpdb,ashwinstar/gpdb,kmjungersen/PostgresXL,ashwinstar/gpdb,edespino/gpdb,Chibin/gpdb,yuanzhao/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,zeroae/postgres-xl,jmcatamney/gpdb,ovr/postgres-xl,techdragon/Postgres-XL,yuanzhao/gpdb,adam8157/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb,xinzweb/gpdb,edespino/gpdb,Chibin/gpdb,lisakowen/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,snaga/postgres-xl,yuanzhao/gpdb,xinzweb/gpdb,Postgres-XL/Postgres-XL,arcivanov/postgres-xl,yuanzhao/gpdb,kmjungersen/PostgresXL,ashwinstar/gpdb,adam8157/gpdb,postmind-net/postgres-xl,yuanzhao/gpdb,pavanvd/postgres-xl,snaga/postgres-xl,zeroae/postgres-xl,Postgres-XL/Postgres-XL,yazun/postgres-xl,Chibin/gpdb,yuanzhao/gpdb,lisakowen/gpdb,zeroae/postgres-xl,greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb