When adding a "target IS NOT NULL" indexqual to the plan for an index-optimized MIN or MAX, we must take care to insert the added qual in a legal place among the existing indexquals, if any.  The btree index AM requires the quals to appear in index-column order.  We didn't have to worry about this before because "target IS NOT NULL" was just treated as a plain scan filter condition; but as of 9.0 it can be an index qual and then it has to follow the rule. Per report from Ian Barwick.
When adding a "target IS NOT NULL" indexqual to the plan for an index-optimized
MIN or MAX, we must take care to insert the added qual in a legal place among
the existing indexquals, if any.  The btree index AM requires the quals to
appear in index-column order.  We didn't have to worry about this before
because "target IS NOT NULL" was just treated as a plain scan filter condition;
but as of 9.0 it can be an index qual and then it has to follow the rule.
Per report from Ian Barwick.

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