Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87d3b35

Browse files
Fix pg_upgrade for 9.3 with data checksums.
Previous changes misconstrued pg_upgrade internalscausing build farm breakages.
1 parentbe475a2 commit87d3b35

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

‎contrib/pg_upgrade/controldata.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
5656
boolgot_toast= false;
5757
boolgot_date_is_int= false;
5858
boolgot_float8_pass_by_value= false;
59-
boolgot_data_checksums= false;
59+
boolgot_data_checksum_version= false;
6060
char*lc_collate=NULL;
6161
char*lc_ctype=NULL;
6262
char*lc_monetary=NULL;
@@ -135,8 +135,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
135135
/* Only in <= 9.2 */
136136
if (GET_MAJOR_VERSION(cluster->major_version) <=902)
137137
{
138-
cluster->controldata.data_checksums=false;
139-
got_data_checksums= true;
138+
cluster->controldata.data_checksum_version=0;
139+
got_data_checksum_version= true;
140140
}
141141

142142
/* we have the result of cmd in "output". so parse it line by line now */
@@ -401,7 +401,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
401401
cluster->controldata.float8_pass_by_value=strstr(p,"by value")!=NULL;
402402
got_float8_pass_by_value= true;
403403
}
404-
elseif ((p=strstr(bufin,"checksums"))!=NULL)
404+
elseif ((p=strstr(bufin,"checksum"))!=NULL)
405405
{
406406
p=strchr(p,':');
407407

@@ -410,8 +410,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
410410

411411
p++;/* removing ':' char */
412412
/* used later for contrib check */
413-
cluster->controldata.data_checksums=strstr(p,"enabled")!=NULL;
414-
got_data_checksums= true;
413+
cluster->controldata.data_checksum_version=str2uint(p);
414+
got_data_checksum_version= true;
415415
}
416416
/* In pre-8.4 only */
417417
elseif ((p=strstr(bufin,"LC_COLLATE:"))!=NULL)
@@ -496,7 +496,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
496496
!got_tli||
497497
!got_align|| !got_blocksz|| !got_largesz|| !got_walsz||
498498
!got_walseg|| !got_ident|| !got_index|| !got_toast||
499-
!got_date_is_int|| !got_float8_pass_by_value|| !got_data_checksums)
499+
!got_date_is_int|| !got_float8_pass_by_value|| !got_data_checksum_version)
500500
{
501501
pg_log(PG_REPORT,
502502
"The %s cluster lacks some required control information:\n",
@@ -556,8 +556,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
556556
pg_log(PG_REPORT," float8 argument passing method\n");
557557

558558
/* value added in Postgres 9.3 */
559-
if (!got_data_checksums)
560-
pg_log(PG_REPORT," datachecksums\n");
559+
if (!got_data_checksum_version)
560+
pg_log(PG_REPORT," datachecksum version\n");
561561

562562
pg_log(PG_FATAL,
563563
"Cannot continue without required control information, terminating\n");
@@ -622,10 +622,10 @@ check_control_data(ControlData *oldctrl,
622622
}
623623

624624
/* We might eventually allow upgrades from checksum to no-checksum clusters. */
625-
if (oldctrl->data_checksums!=newctrl->data_checksums)
625+
if (oldctrl->data_checksum_version!=newctrl->data_checksum_version)
626626
{
627627
pg_log(PG_FATAL,
628-
"old and new pg_controldatachecksums settings are invalid or do not match\n");
628+
"old and new pg_controldatachecksum versions are invalid or do not match\n");
629629
}
630630
}
631631

‎contrib/pg_upgrade/pg_upgrade.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ typedef struct
202202
uint32toast;
203203
booldate_is_int;
204204
boolfloat8_pass_by_value;
205-
booldata_checksums;
205+
booldata_checksum_version;
206206
char*lc_collate;
207207
char*lc_ctype;
208208
char*encoding;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp