@@ -229,7 +229,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
229229 pg_log (PG_FATAL , "%d: controldata retrieval problem\n" , __LINE__ );
230230
231231 p ++ ; /* removing ':' char */
232- cluster -> controldata . chkpnt_tli = str2uint (p );
232+ tli = str2uint (p );
233233 got_tli = true;
234234 }
235235 else if ((p = strstr (bufin , "Latest checkpoint's NextXID:" )) != NULL )
@@ -479,11 +479,11 @@ get_control_data(ClusterInfo *cluster, bool live_check)
479479 * Before 9.3, pg_resetxlog reported the xlogid and segno of the first log
480480 * file after reset as separate lines. Starting with 9.3, it reports the
481481 * WAL file name. If the old cluster is older than 9.3, we construct the
482- * WAL file name from the xlogid and segno.
482+ * WAL file name from the tli, xlogid, and segno.
483483 */
484484 if (GET_MAJOR_VERSION (cluster -> major_version ) <= 902 )
485485 {
486- if (got_log_id && got_log_seg )
486+ if (got_tli && got_log_id && got_log_seg )
487487 {
488488 snprintf (cluster -> controldata .nextxlogfile , 25 , "%08X%08X%08X" ,
489489 tli , logid , segno );
@@ -497,7 +497,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
497497 (!got_oldestmulti &&
498498 cluster -> controldata .cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER ) ||
499499 (!live_check && !got_nextxlogfile ) ||
500- !got_tli ||
501500 !got_align || !got_blocksz || !got_largesz || !got_walsz ||
502501 !got_walseg || !got_ident || !got_index || !got_toast ||
503502 !got_date_is_int || !got_float8_pass_by_value || !got_data_checksum_version )
@@ -525,9 +524,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
525524 if (!live_check && !got_nextxlogfile )
526525 pg_log (PG_REPORT , " first WAL segment after reset\n" );
527526
528- if (!got_tli )
529- pg_log (PG_REPORT , " latest checkpoint timeline ID\n" );
530-
531527 if (!got_align )
532528 pg_log (PG_REPORT , " maximum alignment\n" );
533529
0 commit comments