File tree 4 files changed +10
-12
lines changed
4 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 16
16
#include <time.h>
17
17
#include <sys/stat.h>
18
18
19
- const char * PROGRAM_VERSION = "1.0.1 " ;
19
+ const char * PROGRAM_VERSION = "1.0.2 " ;
20
20
const char * PROGRAM_URL = "https://github.com/postgrespro/pg_probackup" ;
21
21
const char * PROGRAM_EMAIL = "https://github.com/postgrespro/pg_probackup/issues" ;
22
22
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ do_restore(time_t backup_id,
91
91
pgBackup * base_backup = NULL ;
92
92
pgBackup * dest_backup = NULL ;
93
93
pgRecoveryTarget * rt = NULL ;
94
- bool need_recovery_conf = false ;
94
+ bool need_recovery_conf = true ;
95
95
96
96
/* PGDATA and ARCLOG_PATH are always required */
97
97
if (pgdata == NULL )
@@ -200,16 +200,16 @@ do_restore(time_t backup_id,
200
200
/* Tablespace directories checking */
201
201
check_tablespace_mapping ((pgBackup * ) parray_get (backups , last_diff_index ));
202
202
203
+ if (dest_backup && dest_backup -> stream )
204
+ need_recovery_conf = target_time != NULL || target_xid != NULL ;
205
+
203
206
/* Restore backups from base_index to last_diff_index */
204
- need_recovery_conf = target_time != NULL || target_xid != NULL ;
205
207
for (i = base_index ; i >= last_diff_index ; i -- )
206
208
{
207
209
pgBackup * backup = (pgBackup * ) parray_get (backups , i );
208
210
209
211
if (backup -> status == BACKUP_STATUS_OK )
210
212
{
211
- need_recovery_conf = need_recovery_conf || !backup -> stream ;
212
-
213
213
print_backup_lsn (backup );
214
214
restore_database (backup );
215
215
}
Original file line number Diff line number Diff line change 1
- pg_probackup 1.0
1
+ pg_probackup 1.0.2
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ do_validate(time_t backup_id,
39
39
pgBackup * base_backup = NULL ;
40
40
pgBackup * dest_backup = NULL ;
41
41
bool success_validate ,
42
- need_validate_wal = false ;
42
+ need_validate_wal = true ;
43
43
44
44
catalog_lock (false);
45
45
@@ -128,20 +128,18 @@ do_validate(time_t backup_id,
128
128
129
129
Assert (last_diff_index <= base_index );
130
130
131
+ if (dest_backup && dest_backup -> stream )
132
+ need_validate_wal = target_time != NULL || target_xid != NULL ;
133
+
131
134
/* Validate backups from base_index to last_diff_index */
132
- need_validate_wal = target_time != NULL || target_xid != NULL ;
133
135
for (i = base_index ; i >= last_diff_index ; i -- )
134
136
{
135
137
pgBackup * backup = (pgBackup * ) parray_get (backups , i );
136
138
137
139
if (backup -> status == BACKUP_STATUS_OK ||
138
140
backup -> status == BACKUP_STATUS_CORRUPT )
139
- {
140
- need_validate_wal = need_validate_wal || !backup -> stream ;
141
-
142
141
success_validate = pgBackupValidate (backup , false, false) &&
143
142
success_validate ;
144
- }
145
143
}
146
144
147
145
/* and now we must check WALs */
You can’t perform that action at this time.
0 commit comments