1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

Fix pg_upgrade from version 9.2

Commit 7f25eccf41 added a cross-check between pg_database.datminmxid
and oldestMulti, but because PostgreSQL 9.2 doesn't have datminmxid,
it broke upgrade from version 9.2.  Disable the check when upgrading
from 9.2 to fix.

This is for REL_19_STABLE only.  Earlier versions don't have the check,
and on 'master' we no longer support upgrading from version 9.2.

Reported-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://www.postgresql.org/message-id/baef33d6-0416-48db-8e4d-0529a10a101a@dunslane.net
This commit is contained in:
Heikki Linnakangas
2026-09-24 13:12:04 +03:00
parent 8fbbb338be
commit 2ae589741d

View File

@@ -2758,6 +2758,15 @@ check_for_oldestxid_consistency(ClusterInfo *cluster)
int i_datfrozenxid;
int i_datminmxid;
/*
* Version 9.2 didn't have datminmxid. We could still cross-check
* datfrozenxid, but doesn't seem worth it since we're primarily worried
* about the rewriting of the multixact SLRUs losing data if the
* oldestMulti is set incorrectly.
*/
if (GET_MAJOR_VERSION(old_cluster.major_version) < 903)
return;
prep_status("Checking oldestXID and oldestMultiXid consistency");
conn_template1 = connectToServer(cluster, "template1");