Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 34da700

Browse files
committed
Use the catversion to distinguish old/new clusters
This makes 9.3 -> 9.3 upgrades work when they cross the commit that added persistent multixacts; early 9.3 pg_controldata did not have the required oldestMultiXact line, and so would fail to upgrade. per Bruce Momjian
1 parent 2494a9a commit 34da700

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pg_upgrade/controldata.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
470470
/* verify that we got all the mandatory pg_control data */
471471
if (!got_xid || !got_oid ||
472472
!got_multi || !got_mxoff ||
473-
(!got_oldestmulti && GET_MAJOR_VERSION(cluster->major_version) >= 903) ||
473+
(!got_oldestmulti && cluster->controldata.cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER) ||
474474
(!live_check && !got_nextxlogfile) ||
475475
!got_tli ||
476476
!got_align || !got_blocksz || !got_largesz || !got_walsz ||
@@ -493,7 +493,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
493493
if (!got_mxoff)
494494
pg_log(PG_REPORT, " latest checkpoint next MultiXactOffset\n");
495495

496-
if (!got_oldestmulti && GET_MAJOR_VERSION(cluster->major_version) >= 903)
496+
if (!got_oldestmulti && cluster->controldata.cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER)
497497
pg_log(PG_REPORT, " latest checkpoint oldest MultiXactId\n");
498498

499499
if (!live_check && !got_nextxlogfile)

0 commit comments

Comments
 (0)