Advance the stop point for multixact offset creation only at checkpoint.
Advance the stop point for multixact offset creation only at checkpoint.

Commit b69bf30b9bfacafc733a9ba77c9587cf54d06c0c advanced the stop point
at vacuum time, but this has subsequently been shown to be unsafe as a
result of analysis by myself and Thomas Munro and testing by Thomas
Munro.  The crux of the problem is that the SLRU deletion logic may
get confused about what to remove if, at exactly the right time during
the checkpoint process, the head of the SLRU crosses what used to be
the tail.

This patch, by me, fixes the problem by advancing the stop point only
following a checkpoint.  This has the additional advantage of making
the removal logic work during recovery more like the way it works during
normal running, which is probably good.

At least one of the calls to DetermineSafeOldestOffset which this patch
removes was already dead, because MultiXactAdvanceOldest is called only
during recovery and DetermineSafeOldestOffset was set up to do nothing
during recovery.  That, however, is inconsistent with the principle that
recovery and normal running should work similarly, and was confusing to
boot.

Along the way, fix some comments that previous patches in this area
neglected to update.  It's not clear to me whether there's any
concrete basis for the decision to use only half of the multixact ID
space, but it's neither necessary nor sufficient to prevent multixact
member wraparound, so the comments should not say otherwise.

lisakowen/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,zeroae/postgres-xl,pavanvd/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb,adam8157/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,adam8157/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,yazun/postgres-xl,zeroae/postgres-xl,yazun/postgres-xl,greenplum-db/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,ashwinstar/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,ovr/postgres-xl,ashwinstar/gpdb,Postgres-XL/Postgres-XL,xinzweb/gpdb,greenplum-db/gpdb,yazun/postgres-xl,50wu/gpdb,pavanvd/postgres-xl,oberstet/postgres-xl,Postgres-XL/Postgres-XL,xinzweb/gpdb,xinzweb/gpdb,ashwinstar/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,Postgres-XL/Postgres-XL,ovr/postgres-xl,xinzweb/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,lisakowen/gpdb,ovr/postgres-xl,jmcatamney/gpdb,zeroae/postgres-xl,techdragon/Postgres-XL,jmcatamney/gpdb,ovr/postgres-xl,50wu/gpdb,zeroae/postgres-xl,xinzweb/gpdb,50wu/gpdb,techdragon/Postgres-XL,pavanvd/postgres-xl,lisakowen/gpdb,oberstet/postgres-xl,yazun/postgres-xl,adam8157/gpdb,techdragon/Postgres-XL,pavanvd/postgres-xl,lisakowen/gpdb,ashwinstar/gpdb,yazun/postgres-xl,ashwinstar/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,pavanvd/postgres-xl,oberstet/postgres-xl,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,50wu/gpdb,ashwinstar/gpdb,oberstet/postgres-xl,xinzweb/gpdb,50wu/gpdb,jmcatamney/gpdb,adam8157/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,ovr/postgres-xl,ashwinstar/gpdb,adam8157/gpdb