1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-12 14:56:08 +02:00

PGPRO-1918: disable wal validation for RUNNING and ERROR backups

This commit is contained in:
Grigory Smolkin 2019-02-18 20:16:45 +03:00
parent c4259b856b
commit 8c9dcbec70

View File

@ -321,8 +321,12 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
continue;
pgBackupValidate(tmp_backup);
/* Maybe we should be more paranoid and check for !BACKUP_STATUS_OK? */
if (tmp_backup->status == BACKUP_STATUS_CORRUPT)
/* After pgBackupValidate() only following backup
* states are possible: ERROR, RUNNING, CORRUPT and OK.
* Validate WAL only for OK, because there is no point
* in WAL validation for corrupted, errored or running backups.
*/
if (tmp_backup->status != BACKUP_STATUS_OK)
{
corrupted_backup = tmp_backup;
/* we need corrupted backup index from 'backups' not parent_chain