Fix the truncation logic of the OldSerXid SLRU mechanism. We can't pass SimpleLruTruncate() a page number that's "in the future", because it will issue a warning and refuse to truncate anything. Instead, we leave behind the latest segment. If the slru is not needed before XID wrap-around, the segment will appear as new again, and not be cleaned up until it gets old enough again. That's a bit unpleasant, but better than not cleaning up anything.
Fix the truncation logic of the OldSerXid SLRU mechanism. We can't pass
SimpleLruTruncate() a page number that's "in the future", because it will
issue a warning and refuse to truncate anything. Instead, we leave behind
the latest segment. If the slru is not needed before XID wrap-around, the
segment will appear as new again, and not be cleaned up until it gets old
enough again. That's a bit unpleasant, but better than not cleaning up
anything.

Also, fix broken calculation to check and warn if the span of the OldSerXid
SLRU is getting too large to fit in the 64k SLRU pages that we have
available. It was not XID wraparound aware.

Kevin Grittner and me.

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