I think all that's required is to read the epoch at the same time as
the xid and set it at the same time.
I tested this only using the harness so that's a 9.4->9.4 pg_upgrade.
It would be worth testing on older versions but I don't see any
changes to pg_controldata that would be relevant since 8.2 when the
epoch was added.