mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2026-06-21 01:34:15 +02:00
minor improvement of messages for restore
This commit is contained in:
+12
-2
@@ -160,7 +160,7 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
|
||||
if (!satisfy_recovery_target(current_backup, rt))
|
||||
{
|
||||
if (target_backup_id != INVALID_BACKUP_ID)
|
||||
elog(ERROR, "target backup %s does not satisfy restore options",
|
||||
elog(ERROR, "Requested backup %s does not satisfy restore options",
|
||||
base36enc(target_backup_id));
|
||||
else
|
||||
/* Try to find another backup that satisfies target options */
|
||||
@@ -175,8 +175,16 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: Show latest possible target */
|
||||
if (dest_backup == NULL)
|
||||
elog(ERROR, "Backup satisfying target options is not found.");
|
||||
{
|
||||
/* Failed to find target backup */
|
||||
if (target_backup_id)
|
||||
elog(ERROR, "Requested backup %s is not found.", base36enc(target_backup_id));
|
||||
else
|
||||
elog(ERROR, "Backup satisfying target options is not found.");
|
||||
/* TODO: check if user asked PITR or just restore of latest backup */
|
||||
}
|
||||
|
||||
/* If we already found dest_backup, look for full backup. */
|
||||
if (dest_backup->backup_mode == BACKUP_MODE_FULL)
|
||||
@@ -954,6 +962,7 @@ read_timeline_history(TimeLineID targetTLI)
|
||||
return result;
|
||||
}
|
||||
|
||||
/* TODO: do not ignore timelines. What if requested target located in different timeline? */
|
||||
bool
|
||||
satisfy_recovery_target(const pgBackup *backup, const pgRecoveryTarget *rt)
|
||||
{
|
||||
@@ -969,6 +978,7 @@ satisfy_recovery_target(const pgBackup *backup, const pgRecoveryTarget *rt)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* TODO description */
|
||||
bool
|
||||
satisfy_timeline(const parray *timelines, const pgBackup *backup)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user