Commit c3c75fcd authored by Bruce Momjian's avatar Bruce Momjian

pg_upgrade: adjust C comments

parent aae7af3d
...@@ -145,7 +145,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -145,7 +145,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: pg_resetxlog problem\n", __LINE__); pg_fatal("%d: pg_resetxlog problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.ctrl_ver = str2uint(p); cluster->controldata.ctrl_ver = str2uint(p);
} }
else if ((p = strstr(bufin, "Catalog version number:")) != NULL) else if ((p = strstr(bufin, "Catalog version number:")) != NULL)
...@@ -155,7 +155,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -155,7 +155,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.cat_ver = str2uint(p); cluster->controldata.cat_ver = str2uint(p);
} }
else if ((p = strstr(bufin, "First log segment after reset:")) != NULL) else if ((p = strstr(bufin, "First log segment after reset:")) != NULL)
...@@ -182,7 +182,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -182,7 +182,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
logid = str2uint(p); logid = str2uint(p);
got_log_id = true; got_log_id = true;
} }
...@@ -193,7 +193,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -193,7 +193,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
segno = str2uint(p); segno = str2uint(p);
got_log_seg = true; got_log_seg = true;
} }
...@@ -204,7 +204,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -204,7 +204,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.chkpnt_tli = str2uint(p); cluster->controldata.chkpnt_tli = str2uint(p);
got_tli = true; got_tli = true;
} }
...@@ -215,14 +215,14 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -215,14 +215,14 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.chkpnt_nxtepoch = str2uint(p); cluster->controldata.chkpnt_nxtepoch = str2uint(p);
p = strchr(p, '/'); p = strchr(p, '/');
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing '/' char */ p++; /* remove '/' char */
cluster->controldata.chkpnt_nxtxid = str2uint(p); cluster->controldata.chkpnt_nxtxid = str2uint(p);
got_xid = true; got_xid = true;
} }
...@@ -233,7 +233,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -233,7 +233,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.chkpnt_nxtoid = str2uint(p); cluster->controldata.chkpnt_nxtoid = str2uint(p);
got_oid = true; got_oid = true;
} }
...@@ -244,7 +244,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -244,7 +244,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.chkpnt_nxtmulti = str2uint(p); cluster->controldata.chkpnt_nxtmulti = str2uint(p);
got_multi = true; got_multi = true;
} }
...@@ -255,7 +255,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -255,7 +255,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.chkpnt_oldstMulti = str2uint(p); cluster->controldata.chkpnt_oldstMulti = str2uint(p);
got_oldestmulti = true; got_oldestmulti = true;
} }
...@@ -266,7 +266,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -266,7 +266,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.chkpnt_nxtmxoff = str2uint(p); cluster->controldata.chkpnt_nxtmxoff = str2uint(p);
got_mxoff = true; got_mxoff = true;
} }
...@@ -277,7 +277,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -277,7 +277,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.align = str2uint(p); cluster->controldata.align = str2uint(p);
got_align = true; got_align = true;
} }
...@@ -288,7 +288,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -288,7 +288,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.blocksz = str2uint(p); cluster->controldata.blocksz = str2uint(p);
got_blocksz = true; got_blocksz = true;
} }
...@@ -299,7 +299,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -299,7 +299,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.largesz = str2uint(p); cluster->controldata.largesz = str2uint(p);
got_largesz = true; got_largesz = true;
} }
...@@ -310,7 +310,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -310,7 +310,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.walsz = str2uint(p); cluster->controldata.walsz = str2uint(p);
got_walsz = true; got_walsz = true;
} }
...@@ -321,7 +321,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -321,7 +321,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.walseg = str2uint(p); cluster->controldata.walseg = str2uint(p);
got_walseg = true; got_walseg = true;
} }
...@@ -332,7 +332,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -332,7 +332,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.ident = str2uint(p); cluster->controldata.ident = str2uint(p);
got_ident = true; got_ident = true;
} }
...@@ -343,7 +343,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -343,7 +343,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.index = str2uint(p); cluster->controldata.index = str2uint(p);
got_index = true; got_index = true;
} }
...@@ -354,7 +354,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -354,7 +354,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.toast = str2uint(p); cluster->controldata.toast = str2uint(p);
got_toast = true; got_toast = true;
} }
...@@ -365,7 +365,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -365,7 +365,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.large_object = str2uint(p); cluster->controldata.large_object = str2uint(p);
got_large_object = true; got_large_object = true;
} }
...@@ -376,7 +376,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -376,7 +376,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
cluster->controldata.date_is_int = strstr(p, "64-bit integers") != NULL; cluster->controldata.date_is_int = strstr(p, "64-bit integers") != NULL;
got_date_is_int = true; got_date_is_int = true;
} }
...@@ -387,7 +387,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -387,7 +387,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
/* used later for contrib check */ /* used later for contrib check */
cluster->controldata.float8_pass_by_value = strstr(p, "by value") != NULL; cluster->controldata.float8_pass_by_value = strstr(p, "by value") != NULL;
got_float8_pass_by_value = true; got_float8_pass_by_value = true;
...@@ -399,7 +399,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -399,7 +399,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
/* used later for contrib check */ /* used later for contrib check */
cluster->controldata.data_checksum_version = str2uint(p); cluster->controldata.data_checksum_version = str2uint(p);
got_data_checksum_version = true; got_data_checksum_version = true;
...@@ -412,7 +412,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -412,7 +412,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
/* skip leading spaces and remove trailing newline */ /* skip leading spaces and remove trailing newline */
p += strspn(p, " "); p += strspn(p, " ");
if (strlen(p) > 0 && *(p + strlen(p) - 1) == '\n') if (strlen(p) > 0 && *(p + strlen(p) - 1) == '\n')
...@@ -427,7 +427,7 @@ get_control_data(ClusterInfo *cluster, bool live_check) ...@@ -427,7 +427,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (p == NULL || strlen(p) <= 1) if (p == NULL || strlen(p) <= 1)
pg_fatal("%d: controldata retrieval problem\n", __LINE__); pg_fatal("%d: controldata retrieval problem\n", __LINE__);
p++; /* removing ':' char */ p++; /* remove ':' char */
/* skip leading spaces and remove trailing newline */ /* skip leading spaces and remove trailing newline */
p += strspn(p, " "); p += strspn(p, " ");
if (strlen(p) > 0 && *(p + strlen(p) - 1) == '\n') if (strlen(p) > 0 && *(p + strlen(p) - 1) == '\n')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment