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
This commit is contained in:
Alvaro Herrera 2013-01-24 12:25:48 -03:00
parent 2494a9af4c
commit 34da700405
1 changed files with 2 additions and 2 deletions

View File

@ -470,7 +470,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
/* verify that we got all the mandatory pg_control data */
if (!got_xid || !got_oid ||
!got_multi || !got_mxoff ||
(!got_oldestmulti && GET_MAJOR_VERSION(cluster->major_version) >= 903) ||
(!got_oldestmulti && cluster->controldata.cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER) ||
(!live_check && !got_nextxlogfile) ||
!got_tli ||
!got_align || !got_blocksz || !got_largesz || !got_walsz ||
@ -493,7 +493,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (!got_mxoff)
pg_log(PG_REPORT, " latest checkpoint next MultiXactOffset\n");
if (!got_oldestmulti && GET_MAJOR_VERSION(cluster->major_version) >= 903)
if (!got_oldestmulti && cluster->controldata.cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER)
pg_log(PG_REPORT, " latest checkpoint oldest MultiXactId\n");
if (!live_check && !got_nextxlogfile)