@@ -205,8 +205,8 @@ do_restore(const char *target_time,
205
205
continue ;
206
206
207
207
/* is the backup is necessary for restore to target timeline ? */
208
- // if (!satisfy_timeline(timelines, backup) && !satisfy_recovery_target(backup, rt))
209
- if (! satisfy_timeline ( timelines , backup ) || !satisfy_recovery_target (backup , rt ))
208
+ if (!satisfy_timeline (timelines , backup ) ||
209
+ !satisfy_recovery_target (backup , rt ))
210
210
continue ;
211
211
212
212
if (verbose )
@@ -850,23 +850,13 @@ readTimeLineHistory(TimeLineID targetTLI)
850
850
static bool
851
851
satisfy_recovery_target (const pgBackup * backup , const pgRecoveryTarget * rt )
852
852
{
853
- if (rt -> xid_specified ){
854
- // elog(INFO, "in satisfy_recovery_target:xid::%u:%u", backup->recovery_xid, rt->recovery_target_xid);
855
- if (backup -> recovery_xid <= rt -> recovery_target_xid )
856
- return true;
857
- else
858
- return false;
859
- }
860
- if (rt -> time_specified ){
861
- // elog(INFO, "in satisfy_recovery_target:time_t::%ld:%ld", backup->recovery_time, rt->recovery_target_time);
862
- if (backup -> recovery_time <= rt -> recovery_target_time )
863
- return true;
864
- else
865
- return false;
866
- }
867
- else {
853
+ if (rt -> xid_specified )
854
+ return backup -> recovery_xid <= rt -> recovery_target_xid );
855
+
856
+ if (rt -> time_specified )
857
+ return backup -> recovery_time <= rt -> recovery_target_time );
858
+ else
868
859
return true;
869
- }
870
860
}
871
861
872
862
static bool
@@ -1049,7 +1039,7 @@ checkIfCreateRecoveryConf(const char *target_time,
1049
1039
bool dummy_bool ;
1050
1040
pgRecoveryTarget * rt ;
1051
1041
1052
- // init pgRecoveryTarget
1042
+ /* Initialize pgRecoveryTarget */
1053
1043
rt = pgut_new (pgRecoveryTarget );
1054
1044
rt -> time_specified = false;
1055
1045
rt -> xid_specified = false;
0 commit comments