-- WARNING: need compiled-in thresholds of 1 million

vacuum freeze pg_opclass, pg_database;
select relname, relfrozenxid, age(relfrozenxid), relminmxid, mxid_age(relminmxid) from pg_class
where relname in ('pg_database', 'pg_opclass');

do $$begin for i in 1..200000 loop perform txid_current(); commit; end loop; end$$;
vacuum freeze pg_opclass;
select relname, relfrozenxid, age(relfrozenxid), relminmxid, mxid_age(relminmxid) from pg_class
where relname in ('pg_database', 'pg_opclass');

do $$begin for i in 1..900000 loop perform txid_current(); commit; end loop; end$$;
select relname, relfrozenxid, age(relfrozenxid), relminmxid, mxid_age(relminmxid) from pg_class
where relname in ('pg_database', 'pg_opclass');

set vacuum_freeze_min_age = 5000;
show vacuum_freeze_min_age;
vacuum (wraparound);
select relname, relfrozenxid, age(relfrozenxid), relminmxid, mxid_age(relminmxid) from pg_class
where relname in ('pg_database',  'pg_opclass');

