GetOldestXmin: fix VACUUM during upgrade
There are no distributed transactions during binary upgrade, so we can
ignore them.
@@ -1212,8 +1212,12 @@ GetOldestXmin(bool allDbs, bool ignoreVacuum)
/*
* In QD node, all distributed transactions have an entry in the proc array,
* so we're done.
+ *
+ * During binary upgrade, we don't have distributed transactions, so we're
+ * done there too. This ensures correct operation of VACUUM FREEZE during
+ * pg_upgrade.
*/
- if (!IS_QUERY_DISPATCHER())
+ if (!IS_QUERY_DISPATCHER() && !IsBinaryUpgrade)
{
TransactionId distribOldestXmin;
