summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorMagnus Hagander2018-04-09 17:02:42 +0000
committerMagnus Hagander2018-04-09 17:03:42 +0000
commita228cc13aeabff308d6dfc98a1015865f5393fce (patch)
tree4704837fb075ccf7c8e5ecc10f341e527ed0e16d /src/bin
parent03c11796a95cc20a4559a103019d4d22a116a13c (diff)
Revert "Allow on-line enabling and disabling of data checksums"
This reverts the backend sides of commit 1fde38beaa0c3e66c340efc7cc0dc272d6254bb0. I have, at least for now, left the pg_verify_checksums tool in place, as this tool can be very valuable without the rest of the patch as well, and since it's a read-only tool that only runs when the cluster is down it should be a lot safer.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pg_upgrade/controldata.c9
-rw-r--r--src/bin/pg_upgrade/pg_upgrade.h2
-rw-r--r--src/bin/pg_verify_checksums/pg_verify_checksums.c5
3 files changed, 2 insertions, 14 deletions
diff --git a/src/bin/pg_upgrade/controldata.c b/src/bin/pg_upgrade/controldata.c
index 4bb2b7e6ec3..0fe98a550e1 100644
--- a/src/bin/pg_upgrade/controldata.c
+++ b/src/bin/pg_upgrade/controldata.c
@@ -591,15 +591,6 @@ check_control_data(ControlData *oldctrl,
*/
/*
- * If checksums have been turned on in the old cluster, but the
- * checksumhelper have yet to finish, then disallow upgrading. The user
- * should either let the process finish, or turn off checksums, before
- * retrying.
- */
- if (oldctrl->data_checksum_version == 2)
- pg_fatal("transition to data checksums not completed in old cluster\n");
-
- /*
* We might eventually allow upgrades from checksum to no-checksum
* clusters.
*/
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 449a703c475..7e5e9712947 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -226,7 +226,7 @@ typedef struct
uint32 large_object;
bool date_is_int;
bool float8_pass_by_value;
- uint32 data_checksum_version;
+ bool data_checksum_version;
} ControlData;
/*
diff --git a/src/bin/pg_verify_checksums/pg_verify_checksums.c b/src/bin/pg_verify_checksums/pg_verify_checksums.c
index 07271d02204..ddbd7fa33cc 100644
--- a/src/bin/pg_verify_checksums/pg_verify_checksums.c
+++ b/src/bin/pg_verify_checksums/pg_verify_checksums.c
@@ -307,10 +307,7 @@ main(int argc, char *argv[])
printf(_("Data checksum version: %d\n"), ControlFile->data_checksum_version);
printf(_("Files scanned: %" INT64_MODIFIER "d\n"), files);
printf(_("Blocks scanned: %" INT64_MODIFIER "d\n"), blocks);
- if (ControlFile->data_checksum_version == PG_DATA_CHECKSUM_INPROGRESS_VERSION)
- printf(_("Blocks left in progress: %" INT64_MODIFIER "d\n"), badblocks);
- else
- printf(_("Bad checksums: %" INT64_MODIFIER "d\n"), badblocks);
+ printf(_("Bad checksums: %" INT64_MODIFIER "d\n"), badblocks);
if (badblocks > 0)
return 1;