@@ -154,23 +154,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
154154p ++ ;/* remove ':' char */
155155cluster -> controldata .cat_ver = str2uint (p );
156156}
157- else if ((p = strstr (bufin ,"First log segment after reset:" ))!= NULL )
158- {
159- /* Skip the colon and any whitespace after it */
160- p = strchr (p ,':' );
161- if (p == NULL || strlen (p ) <=1 )
162- pg_fatal ("%d: controldata retrieval problem\n" ,__LINE__ );
163- p = strpbrk (p ,"01234567890ABCDEF" );
164- if (p == NULL || strlen (p ) <=1 )
165- pg_fatal ("%d: controldata retrieval problem\n" ,__LINE__ );
166-
167- /* Make sure it looks like a valid WAL file name */
168- if (strspn (p ,"0123456789ABCDEF" )!= 24 )
169- pg_fatal ("%d: controldata retrieval problem\n" ,__LINE__ );
170-
171- strlcpy (cluster -> controldata .nextxlogfile ,p ,25 );
172- got_nextxlogfile = true;
173- }
174157else if ((p = strstr (bufin ,"First log file ID after reset:" ))!= NULL )
175158{
176159p = strchr (p ,':' );
@@ -201,7 +184,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
201184pg_fatal ("%d: controldata retrieval problem\n" ,__LINE__ );
202185
203186p ++ ;/* remove ':' char */
204- cluster -> controldata . chkpnt_tli = str2uint (p );
187+ tli = str2uint (p );
205188got_tli = true;
206189}
207190else if ((p = strstr (bufin ,"Latest checkpoint's NextXID:" ))!= NULL )
@@ -266,6 +249,23 @@ get_control_data(ClusterInfo *cluster, bool live_check)
266249cluster -> controldata .chkpnt_nxtmxoff = str2uint (p );
267250got_mxoff = true;
268251}
252+ else if ((p = strstr (bufin ,"First log segment after reset:" ))!= NULL )
253+ {
254+ /* Skip the colon and any whitespace after it */
255+ p = strchr (p ,':' );
256+ if (p == NULL || strlen (p ) <=1 )
257+ pg_fatal ("%d: controldata retrieval problem\n" ,__LINE__ );
258+ p = strpbrk (p ,"01234567890ABCDEF" );
259+ if (p == NULL || strlen (p ) <=1 )
260+ pg_fatal ("%d: controldata retrieval problem\n" ,__LINE__ );
261+
262+ /* Make sure it looks like a valid WAL file name */
263+ if (strspn (p ,"0123456789ABCDEF" )!= 24 )
264+ pg_fatal ("%d: controldata retrieval problem\n" ,__LINE__ );
265+
266+ strlcpy (cluster -> controldata .nextxlogfile ,p ,25 );
267+ got_nextxlogfile = true;
268+ }
269269else if ((p = strstr (bufin ,"Maximum data alignment:" ))!= NULL )
270270{
271271p = strchr (p ,':' );
@@ -436,7 +436,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
436436 */
437437if (GET_MAJOR_VERSION (cluster -> major_version ) <=902 )
438438{
439- if (got_log_id && got_log_seg )
439+ if (got_tli && got_log_id && got_log_seg )
440440{
441441snprintf (cluster -> controldata .nextxlogfile ,25 ,"%08X%08X%08X" ,
442442tli ,logid ,segno );
@@ -446,11 +446,10 @@ get_control_data(ClusterInfo *cluster, bool live_check)
446446
447447/* verify that we got all the mandatory pg_control data */
448448if (!got_xid || !got_oid ||
449- !got_multi || ! got_mxoff ||
449+ !got_multi ||
450450(!got_oldestmulti &&
451451cluster -> controldata .cat_ver >=MULTIXACT_FORMATCHANGE_CAT_VER )||
452- (!live_check && !got_nextxlogfile )||
453- !got_tli ||
452+ !got_mxoff || (!live_check && !got_nextxlogfile )||
454453!got_align || !got_blocksz || !got_largesz || !got_walsz ||
455454!got_walseg || !got_ident || !got_index || !got_toast ||
456455(!got_large_object &&
@@ -470,19 +469,16 @@ get_control_data(ClusterInfo *cluster, bool live_check)
470469if (!got_multi )
471470pg_log (PG_REPORT ," latest checkpoint next MultiXactId\n" );
472471
473- if (!got_mxoff )
474- pg_log (PG_REPORT ," latest checkpoint next MultiXactOffset\n" );
475-
476472if (!got_oldestmulti &&
477473cluster -> controldata .cat_ver >=MULTIXACT_FORMATCHANGE_CAT_VER )
478474pg_log (PG_REPORT ," latest checkpoint oldest MultiXactId\n" );
479475
476+ if (!got_mxoff )
477+ pg_log (PG_REPORT ," latest checkpoint next MultiXactOffset\n" );
478+
480479if (!live_check && !got_nextxlogfile )
481480pg_log (PG_REPORT ," first WAL segment after reset\n" );
482481
483- if (!got_tli )
484- pg_log (PG_REPORT ," latest checkpoint timeline ID\n" );
485-
486482if (!got_align )
487483pg_log (PG_REPORT ," maximum alignment\n" );
488484
@@ -568,6 +564,9 @@ check_control_data(ControlData *oldctrl,
568564if (oldctrl -> date_is_int != newctrl -> date_is_int )
569565pg_fatal ("old and new pg_controldata date/time storage types do not match\n" );
570566
567+ if (oldctrl -> float8_pass_by_value != newctrl -> float8_pass_by_value )
568+ pg_fatal ("old and new pg_controldata float8 argument passing methods do not match\n" );
569+
571570/*
572571 * We might eventually allow upgrades from checksum to no-checksum
573572 * clusters.