We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent056764b commitdc01efaCopy full SHA for dc01efa
contrib/pg_upgrade/controldata.c
@@ -572,10 +572,14 @@ check_control_data(ControlData *oldctrl,
572
* We might eventually allow upgrades from checksum to no-checksum
573
* clusters.
574
*/
575
-if (oldctrl->data_checksum_version!=newctrl->data_checksum_version)
576
-{
577
-pg_fatal("old and new pg_controldata checksum versions are invalid or do not match\n");
578
-}
+if (oldctrl->data_checksum_version==0&&
+newctrl->data_checksum_version!=0)
+pg_fatal("old cluster does not use data checksums but the new one does\n");
+elseif (oldctrl->data_checksum_version!=0&&
579
+newctrl->data_checksum_version==0)
580
+pg_fatal("old cluster uses data checksums but the new one does not\n");
581
+elseif (oldctrl->data_checksum_version!=newctrl->data_checksum_version)
582
+pg_fatal("old and new cluster pg_controldata checksum versions do not match\n");
583
}
584
585