Skip to content

Commit

Permalink
pg_upgrade: Fix some minor code issues
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
petere committed Aug 12, 2022
1 parent ba78b6b commit d0dde35
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/bin/pg_upgrade/controldata.c
Expand Up @@ -493,7 +493,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
pg_fatal("%d: controldata retrieval problem\n", __LINE__);

p++; /* remove ':' char */
/* used later for contrib check */
cluster->controldata.data_checksum_version = str2uint(p);
got_data_checksum_version = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bin/pg_upgrade/pg_upgrade.h
Expand Up @@ -227,7 +227,7 @@ typedef struct
uint32 large_object;
bool date_is_int;
bool float8_pass_by_value;
bool data_checksum_version;
uint32 data_checksum_version;
} ControlData;

/*
Expand Down

0 comments on commit d0dde35

Please sign in to comment.