Keep rs_startblock the same during heap_rescan, so that a rescan of a SeqScan node starts from the same place as the first scan did.  This avoids surprising behavior of scrollable and WITH HOLD cursors, as seen in Mark Kirkwood's bug report of yesterday.
Keep rs_startblock the same during heap_rescan, so that a rescan of a SeqScan
node starts from the same place as the first scan did.  This avoids surprising
behavior of scrollable and WITH HOLD cursors, as seen in Mark Kirkwood's bug
report of yesterday.

It's not entirely clear whether a rescan should be forced to drop out of the
syncscan mode, but for the moment I left the code behaving the same on that
point.  Any change there would only be a performance and not a correctness
issue, anyway.

Back-patch to 8.3, since the unstable behavior was created by the syncscan
patch.

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