Prevent synchronized scanning when systable_beginscan chooses a heapscan.
Prevent synchronized scanning when systable_beginscan chooses a heapscan.

The only interesting-for-performance case wherein we force heapscan here
is when we're rebuilding the relcache init file, and the only such case
that is likely to be examining a catalog big enough to be syncscanned is
RelationBuildTupleDesc.  But the early-exit optimization in that code gets
broken if we start the scan at a random place within the catalog, so that
allowing syncscan is actually a big deoptimization if pg_attribute is large
(at least for the normal case where the rows for core system catalogs have
never been changed since initdb).  Hence, prevent syncscan here.  Per my
testing pursuant to complaints from Jeff Frost and Greg Sabino Mullane,
though neither of them seem to have actually hit this specific problem.

Back-patch to 8.3, where syncscan was introduced.

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