@@ -56,7 +56,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
5656bool got_toast = false;
5757bool got_date_is_int = false;
5858bool got_float8_pass_by_value = false;
59- bool got_data_checksums = false;
59+ bool got_data_checksum_version = false;
6060char * lc_collate = NULL ;
6161char * lc_ctype = NULL ;
6262char * lc_monetary = NULL ;
@@ -135,8 +135,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
135135/* Only in <= 9.2 */
136136if (GET_MAJOR_VERSION (cluster -> major_version ) <=902 )
137137{
138- cluster -> controldata .data_checksums = false ;
139- got_data_checksums = true;
138+ cluster -> controldata .data_checksum_version = 0 ;
139+ got_data_checksum_version = true;
140140}
141141
142142/* we have the result of cmd in "output". so parse it line by line now */
@@ -401,7 +401,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
401401cluster -> controldata .float8_pass_by_value = strstr (p ,"by value" )!= NULL ;
402402got_float8_pass_by_value = true;
403403}
404- else if ((p = strstr (bufin ,"checksums " ))!= NULL )
404+ else if ((p = strstr (bufin ,"checksum " ))!= NULL )
405405{
406406p = strchr (p ,':' );
407407
@@ -410,8 +410,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
410410
411411p ++ ;/* removing ':' char */
412412/* used later for contrib check */
413- cluster -> controldata .data_checksums = strstr ( p , "enabled" ) != NULL ;
414- got_data_checksums = true;
413+ cluster -> controldata .data_checksum_version = str2uint ( p ) ;
414+ got_data_checksum_version = true;
415415}
416416/* In pre-8.4 only */
417417else if ((p = strstr (bufin ,"LC_COLLATE:" ))!= NULL )
@@ -496,7 +496,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
496496!got_tli ||
497497!got_align || !got_blocksz || !got_largesz || !got_walsz ||
498498!got_walseg || !got_ident || !got_index || !got_toast ||
499- !got_date_is_int || !got_float8_pass_by_value || !got_data_checksums )
499+ !got_date_is_int || !got_float8_pass_by_value || !got_data_checksum_version )
500500{
501501pg_log (PG_REPORT ,
502502"The %s cluster lacks some required control information:\n" ,
@@ -556,8 +556,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
556556pg_log (PG_REPORT ," float8 argument passing method\n" );
557557
558558/* value added in Postgres 9.3 */
559- if (!got_data_checksums )
560- pg_log (PG_REPORT ," datachecksums \n" );
559+ if (!got_data_checksum_version )
560+ pg_log (PG_REPORT ," datachecksum version \n" );
561561
562562pg_log (PG_FATAL ,
563563"Cannot continue without required control information, terminating\n" );
@@ -622,10 +622,10 @@ check_control_data(ControlData *oldctrl,
622622}
623623
624624/* We might eventually allow upgrades from checksum to no-checksum clusters. */
625- if (oldctrl -> data_checksums != newctrl -> data_checksums )
625+ if (oldctrl -> data_checksum_version != newctrl -> data_checksum_version )
626626{
627627pg_log (PG_FATAL ,
628- "old and new pg_controldatachecksums settings are invalid or do not match\n" );
628+ "old and new pg_controldatachecksum versions are invalid or do not match\n" );
629629}
630630}
631631