@@ -229,7 +229,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
229
229
pg_log (PG_FATAL , "%d: controldata retrieval problem\n" , __LINE__ );
230
230
231
231
p ++ ; /* removing ':' char */
232
- cluster -> controldata . chkpnt_tli = str2uint (p );
232
+ tli = str2uint (p );
233
233
got_tli = true;
234
234
}
235
235
else if ((p = strstr (bufin , "Latest checkpoint's NextXID:" )) != NULL )
@@ -479,11 +479,11 @@ get_control_data(ClusterInfo *cluster, bool live_check)
479
479
* Before 9.3, pg_resetxlog reported the xlogid and segno of the first log
480
480
* file after reset as separate lines. Starting with 9.3, it reports the
481
481
* 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.
483
483
*/
484
484
if (GET_MAJOR_VERSION (cluster -> major_version ) <= 902 )
485
485
{
486
- if (got_log_id && got_log_seg )
486
+ if (got_tli && got_log_id && got_log_seg )
487
487
{
488
488
snprintf (cluster -> controldata .nextxlogfile , 25 , "%08X%08X%08X" ,
489
489
tli , logid , segno );
@@ -497,7 +497,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
497
497
(!got_oldestmulti &&
498
498
cluster -> controldata .cat_ver >= MULTIXACT_FORMATCHANGE_CAT_VER ) ||
499
499
(!live_check && !got_nextxlogfile ) ||
500
- !got_tli ||
501
500
!got_align || !got_blocksz || !got_largesz || !got_walsz ||
502
501
!got_walseg || !got_ident || !got_index || !got_toast ||
503
502
!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)
525
524
if (!live_check && !got_nextxlogfile )
526
525
pg_log (PG_REPORT , " first WAL segment after reset\n" );
527
526
528
- if (!got_tli )
529
- pg_log (PG_REPORT , " latest checkpoint timeline ID\n" );
530
-
531
527
if (!got_align )
532
528
pg_log (PG_REPORT , " maximum alignment\n" );
533
529
0 commit comments