Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0dde35

Browse files
committed
pg_upgrade: Fix some minor code issues
96ef3b8 accidentally copied a not applicable comment from the float8_pass_by_value code to the data_checksums code. Remove that. 87d3b35 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.
1 parent ba78b6b commit d0dde35

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/bin/pg_upgrade/controldata.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
493493
pg_fatal("%d: controldata retrieval problem\n", __LINE__);
494494

495495
p++; /* remove ':' char */
496-
/* used later for contrib check */
497496
cluster->controldata.data_checksum_version = str2uint(p);
498497
got_data_checksum_version = true;
499498
}

src/bin/pg_upgrade/pg_upgrade.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ typedef struct
227227
uint32 large_object;
228228
bool date_is_int;
229229
bool float8_pass_by_value;
230-
bool data_checksum_version;
230+
uint32 data_checksum_version;
231231
} ControlData;
232232

233233
/*

0 commit comments

Comments
 (0)