@@ -488,7 +488,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
488488 !got_align || !got_blocksz || !got_largesz || !got_walsz ||
489489 !got_walseg || !got_ident || !got_index || !got_toast ||
490490 (!got_large_object &&
491- cluster -> controldata .cat_ver >= LARGE_OBJECT_SIZE_PG_CONTROL_VER ) ||
491+ cluster -> controldata .ctrl_ver >= LARGE_OBJECT_SIZE_PG_CONTROL_VER ) ||
492492 !got_date_is_int || !got_float8_pass_by_value || !got_data_checksum_version )
493493 {
494494 pg_log (PG_REPORT ,
@@ -542,7 +542,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
542542 pg_log (PG_REPORT , " maximum TOAST chunk size\n" );
543543
544544 if (!got_large_object &&
545- cluster -> controldata .cat_ver >= LARGE_OBJECT_SIZE_PG_CONTROL_VER )
545+ cluster -> controldata .ctrl_ver >= LARGE_OBJECT_SIZE_PG_CONTROL_VER )
546546 pg_log (PG_REPORT , " large-object chunk size\n" );
547547
548548 if (!got_date_is_int )
@@ -594,7 +594,9 @@ check_control_data(ControlData *oldctrl,
594594 if (oldctrl -> toast == 0 || oldctrl -> toast != newctrl -> toast )
595595 pg_fatal ("old and new pg_controldata maximum TOAST chunk sizes are invalid or do not match\n" );
596596
597- if (oldctrl -> large_object == 0 || oldctrl -> large_object != newctrl -> large_object )
597+ /* large_object added in 9.5, so it might not exist in the old cluster */
598+ if (oldctrl -> large_object != 0 &&
599+ oldctrl -> large_object != newctrl -> large_object )
598600 pg_fatal ("old and new pg_controldata large-object chunk sizes are invalid or do not match\n" );
599601
600602 if (oldctrl -> date_is_int != newctrl -> date_is_int )
0 commit comments