@@ -228,7 +228,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
228228 pg_fatal ("%d: controldata retrieval problem\n" , __LINE__ );
229229
230230 p ++ ; /* removing ':' char */
231- cluster -> controldata . chkpnt_tli = str2uint (p );
231+ tli = str2uint (p );
232232 got_tli = true;
233233 }
234234 else if ((p = strstr (bufin , "Latest checkpoint's NextXID:" )) != NULL )
@@ -478,11 +478,11 @@ get_control_data(ClusterInfo *cluster, bool live_check)
478478 * Before 9.3, pg_resetxlog reported the xlogid and segno of the first log
479479 * file after reset as separate lines. Starting with 9.3, it reports the
480480 * WAL file name. If the old cluster is older than 9.3, we construct the
481- * WAL file name from the xlogid and segno.
481+ * WAL file name from the tli, xlogid, and segno.
482482 */
483483 if (GET_MAJOR_VERSION (cluster -> major_version ) <= 902 )
484484 {
485- if (got_log_id && got_log_seg )
485+ if (got_tli && got_log_id && got_log_seg )
486486 {
487487 snprintf (cluster -> controldata .nextxlogfile , 25 , "%08X%08X%08X" ,
488488 tli , logid , segno );
@@ -496,7 +496,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
496496 (!got_oldestmulti &&
497497 cluster -> controldata .cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER ) ||
498498 (!live_check && !got_nextxlogfile ) ||
499- !got_tli ||
500499 !got_align || !got_blocksz || !got_largesz || !got_walsz ||
501500 !got_walseg || !got_ident || !got_index || !got_toast ||
502501 !got_date_is_int || !got_float8_pass_by_value || !got_data_checksum_version )
@@ -524,9 +523,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
524523 if (!live_check && !got_nextxlogfile )
525524 pg_log (PG_REPORT , " first WAL segment after reset\n" );
526525
527- if (!got_tli )
528- pg_log (PG_REPORT , " latest checkpoint timeline ID\n" );
529-
530526 if (!got_align )
531527 pg_log (PG_REPORT , " maximum alignment\n" );
532528
0 commit comments