File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -572,10 +572,14 @@ check_control_data(ControlData *oldctrl,
572
572
* We might eventually allow upgrades from checksum to no-checksum
573
573
* clusters.
574
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
- }
575
+ if (oldctrl -> data_checksum_version == 0 &&
576
+ newctrl -> data_checksum_version != 0 )
577
+ pg_fatal ("old cluster does not use data checksums but the new one does\n" );
578
+ else if (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
+ else if (oldctrl -> data_checksum_version != newctrl -> data_checksum_version )
582
+ pg_fatal ("old and new cluster pg_controldata checksum versions do not match\n" );
579
583
}
580
584
581
585
You can’t perform that action at this time.
0 commit comments