Fix bug in early startup of Hot Standby with subtransactions. When HS startup is deferred because of overflowed subtransactions, ensure that we re-initialize KnownAssignedXids for when both existing and incoming snapshots have non-zero qualifying xids.
Fix bug in early startup of Hot Standby with subtransactions.
When HS startup is deferred because of overflowed subtransactions, ensure
that we re-initialize KnownAssignedXids for when both existing and incoming
snapshots have non-zero qualifying xids.

Fixes bug #6661 reported by Valentine Gogichashvili.

Analysis and fix by Andres Freund

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