summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut2022-08-12 22:00:41 +0000
committerPeter Eisentraut2022-08-12 22:00:41 +0000
commit9da300128df71b8f3f2a92038aee251413735dbe (patch)
tree6d8a9e02865ae9f2819865439787a477fd97b878 /src
parentc0408743c48fd9d6e34c40c38d8ca826e4a28525 (diff)
pg_upgrade: Fix some minor code issues
96ef3b8ff1cf1950e897fd2f766d4bd9ef0d5d56 accidentally copied a not applicable comment from the float8_pass_by_value code to the data_checksums code. Remove that. 87d3b35a1ca31a9d947a8f919a6006679216dff0 changed pg_upgrade to checking the checksum version rather than just the Boolean presence of checksums, but didn't change the field type in its ControlData struct from bool. So this would not work correctly if there ever is a checksum version larger than 1.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_upgrade/controldata.c1
-rw-r--r--src/bin/pg_upgrade/pg_upgrade.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/bin/pg_upgrade/controldata.c b/src/bin/pg_upgrade/controldata.c
index 07de9183588..e2086a07dea 100644
--- a/src/bin/pg_upgrade/controldata.c
+++ b/src/bin/pg_upgrade/controldata.c
@@ -497,7 +497,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
pg_fatal("%d: controldata retrieval problem", __LINE__);
p++; /* remove ':' char */
- /* used later for contrib check */
cluster->controldata.data_checksum_version = str2uint(p);
got_data_checksum_version = true;
}
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 728908b1a09..60c3c8dd68e 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -216,7 +216,7 @@ typedef struct
uint32 large_object;
bool date_is_int;
bool float8_pass_by_value;
- bool data_checksum_version;
+ uint32 data_checksum_version;
} ControlData;
/*