Respect Hot Standby controls while recycling btree index pages. Btree pages were recycled after VACUUM deletes all records on a page and then a subsequent VACUUM occurs after the RecentXmin horizon is reached. Using RecentXmin meant that we did not respond correctly to the user controls provide to avoid Hot Standby conflicts and so spurious conflicts could be generated in some workload combinations. We now reuse pages only when we reach RecentGlobalXmin, which can be much later in the presence of long running queries and is also controlled by vacuum_defer_cleanup_age and hot_standby_feedback.
Respect Hot Standby controls while recycling btree index pages.
Btree pages were recycled after VACUUM deletes all records on a
page and then a subsequent VACUUM occurs after the RecentXmin
horizon is reached. Using RecentXmin meant that we did not respond
correctly to the user controls provide to avoid Hot Standby
conflicts and so spurious conflicts could be generated in some
workload combinations. We now reuse pages only when we reach
RecentGlobalXmin, which can be much later in the presence of long
running queries and is also controlled by vacuum_defer_cleanup_age
and hot_standby_feedback.

Noah Misch and Simon Riggs

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