File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -470,7 +470,8 @@ 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 && cluster -> controldata .cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER ) ||
473+ (!got_oldestmulti &&
474+ cluster -> controldata .cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER ) ||
474475 (!live_check && !got_nextxlogfile ) ||
475476 !got_tli ||
476477 !got_align || !got_blocksz || !got_largesz || !got_walsz ||
@@ -493,7 +494,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
493494 if (!got_mxoff )
494495 pg_log (PG_REPORT , " latest checkpoint next MultiXactOffset\n" );
495496
496- if (!got_oldestmulti && cluster -> controldata .cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER )
497+ if (!got_oldestmulti &&
498+ cluster -> controldata .cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER )
497499 pg_log (PG_REPORT , " latest checkpoint oldest MultiXactId\n" );
498500
499501 if (!live_check && !got_nextxlogfile )
Original file line number Diff line number Diff line change @@ -407,11 +407,10 @@ copy_clog_xlog_xid(void)
407407 check_ok ();
408408
409409 /*
410- * If both new and old are after the pg_multixact change commit, copy those
411- * files too. If the old server is before that change and the new server
412- * is after, then we don't copy anything but we need to reset pg_control so
413- * that the new server doesn't attempt to read multis older than the cutoff
414- * value.
410+ * If the old server is before the MULTIXACT_FORMATCHANGE_CAT_VER change
411+ * (see pg_upgrade.h) and the new server is after, then we don't copy
412+ * pg_multixact files, but we need to reset pg_control so that the new
413+ * server doesn't attempt to read multis older than the cutoff value.
415414 */
416415 if (old_cluster .controldata .cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER &&
417416 new_cluster .controldata .cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER )
Original file line number Diff line number Diff line change @@ -109,7 +109,10 @@ extern char *output_files[];
109109#define VISIBILITY_MAP_CRASHSAFE_CAT_VER 201107031
110110
111111/*
112- * pg_multixact format changed in this catversion:
112+ * pg_multixact format changed in 9.3 commit 0ac5ad5134f2769ccbaefec73844f85,
113+ * ("Improve concurrency of foreign key locking") which also updated catalog
114+ * version to this value. pg_upgrade behavior depends on whether old and new
115+ * server versions are both newer than this, or only the new one is.
113116 */
114117#define MULTIXACT_FORMATCHANGE_CAT_VER 201301231
115118
You can’t perform that action at this time.
0 commit comments