postgres.git / summary / log / commit / refs

commit    2ae589741df0fa626386aa10b679f7ffb67b0b09
Author:   Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date:     Thu Sep 24 10:12:04 2026 +0000

    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


src/bin/pg_upgrade/check.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c index 5b8c6ee145f..affc9e3c6cf 100644 --- a/src/bin/pg_upgrade/check.c +++ b/src/bin/pg_upgrade/check.c @@ -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"); [parent: 8fbbb338bed7]