pg_upgrade: compare control version, not catalog version
Also modify test for the possibility the large object value might not exist in the old cluster. Fix for commit e1598a15f4fb0f076a6034d3d3debb9776aff07a
This commit is contained in:
parent
e1598a15f4
commit
acc8e41681
@ -488,7 +488,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
|
||||
!got_align || !got_blocksz || !got_largesz || !got_walsz ||
|
||||
!got_walseg || !got_ident || !got_index || !got_toast ||
|
||||
(!got_large_object &&
|
||||
cluster->controldata.cat_ver >= LARGE_OBJECT_SIZE_PG_CONTROL_VER) ||
|
||||
cluster->controldata.ctrl_ver >= LARGE_OBJECT_SIZE_PG_CONTROL_VER) ||
|
||||
!got_date_is_int || !got_float8_pass_by_value || !got_data_checksum_version)
|
||||
{
|
||||
pg_log(PG_REPORT,
|
||||
@ -542,7 +542,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
|
||||
pg_log(PG_REPORT, " maximum TOAST chunk size\n");
|
||||
|
||||
if (!got_large_object &&
|
||||
cluster->controldata.cat_ver >= LARGE_OBJECT_SIZE_PG_CONTROL_VER)
|
||||
cluster->controldata.ctrl_ver >= LARGE_OBJECT_SIZE_PG_CONTROL_VER)
|
||||
pg_log(PG_REPORT, " large-object chunk size\n");
|
||||
|
||||
if (!got_date_is_int)
|
||||
@ -594,7 +594,9 @@ check_control_data(ControlData *oldctrl,
|
||||
if (oldctrl->toast == 0 || oldctrl->toast != newctrl->toast)
|
||||
pg_fatal("old and new pg_controldata maximum TOAST chunk sizes are invalid or do not match\n");
|
||||
|
||||
if (oldctrl->large_object == 0 || oldctrl->large_object != newctrl->large_object)
|
||||
/* large_object added in 9.5, so it might not exist in the old cluster */
|
||||
if (oldctrl->large_object != 0 &&
|
||||
oldctrl->large_object != newctrl->large_object)
|
||||
pg_fatal("old and new pg_controldata large-object chunk sizes are invalid or do not match\n");
|
||||
|
||||
if (oldctrl->date_is_int != newctrl->date_is_int)
|
||||
|
Loading…
x
Reference in New Issue
Block a user