@@ -488,7 +488,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
488
488
!got_align || !got_blocksz || !got_largesz || !got_walsz ||
489
489
!got_walseg || !got_ident || !got_index || !got_toast ||
490
490
(!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 ) ||
492
492
!got_date_is_int || !got_float8_pass_by_value || !got_data_checksum_version )
493
493
{
494
494
pg_log (PG_REPORT ,
@@ -542,7 +542,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
542
542
pg_log (PG_REPORT , " maximum TOAST chunk size\n" );
543
543
544
544
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 )
546
546
pg_log (PG_REPORT , " large-object chunk size\n" );
547
547
548
548
if (!got_date_is_int )
@@ -594,7 +594,9 @@ check_control_data(ControlData *oldctrl,
594
594
if (oldctrl -> toast == 0 || oldctrl -> toast != newctrl -> toast )
595
595
pg_fatal ("old and new pg_controldata maximum TOAST chunk sizes are invalid or do not match\n" );
596
596
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 )
598
600
pg_fatal ("old and new pg_controldata large-object chunk sizes are invalid or do not match\n" );
599
601
600
602
if (oldctrl -> date_is_int != newctrl -> date_is_int )
0 commit comments