bool got_toast = false;
bool got_date_is_int = false;
bool got_float8_pass_by_value = false;
- bool got_data_checksums = false;
+ bool got_data_checksum_version = false;
char *lc_collate = NULL;
char *lc_ctype = NULL;
char *lc_monetary = NULL;
/* Only in <= 9.2 */
if (GET_MAJOR_VERSION(cluster->major_version) <= 902)
{
- cluster->controldata.data_checksums = false;
- got_data_checksums = true;
+ cluster->controldata.data_checksum_version = 0;
+ got_data_checksum_version = true;
}
/* we have the result of cmd in "output". so parse it line by line now */
cluster->controldata.float8_pass_by_value = strstr(p, "by value") != NULL;
got_float8_pass_by_value = true;
}
- else if ((p = strstr(bufin, "checksums")) != NULL)
+ else if ((p = strstr(bufin, "checksum")) != NULL)
{
p = strchr(p, ':');
p++; /* removing ':' char */
/* used later for contrib check */
- cluster->controldata.data_checksums = strstr(p, "enabled") != NULL;
- got_data_checksums = true;
+ cluster->controldata.data_checksum_version = str2uint(p);
+ got_data_checksum_version = true;
}
/* In pre-8.4 only */
else if ((p = strstr(bufin, "LC_COLLATE:")) != NULL)
!got_tli ||
!got_align || !got_blocksz || !got_largesz || !got_walsz ||
!got_walseg || !got_ident || !got_index || !got_toast ||
- !got_date_is_int || !got_float8_pass_by_value || !got_data_checksums)
+ !got_date_is_int || !got_float8_pass_by_value || !got_data_checksum_version)
{
pg_log(PG_REPORT,
"The %s cluster lacks some required control information:\n",
pg_log(PG_REPORT, " float8 argument passing method\n");
/* value added in Postgres 9.3 */
- if (!got_data_checksums)
- pg_log(PG_REPORT, " data checksums\n");
+ if (!got_data_checksum_version)
+ pg_log(PG_REPORT, " data checksum version\n");
pg_log(PG_FATAL,
"Cannot continue without required control information, terminating\n");
}
/* We might eventually allow upgrades from checksum to no-checksum clusters. */
- if (oldctrl->data_checksums != newctrl->data_checksums)
+ if (oldctrl->data_checksum_version != newctrl->data_checksum_version)
{
pg_log(PG_FATAL,
- "old and new pg_controldata checksums settings are invalid or do not match\n");
+ "old and new pg_controldata checksum versions are invalid or do not match\n");
}
}