Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8fa0bbc

Browse files
committed
minor improvement of messages for restore
1 parent7f0ab09 commit8fa0bbc

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎src/restore.c‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
160160
if (!satisfy_recovery_target(current_backup,rt))
161161
{
162162
if (target_backup_id!=INVALID_BACKUP_ID)
163-
elog(ERROR,"target backup %s does not satisfy restore options",
163+
elog(ERROR,"Requested backup %s does not satisfy restore options",
164164
base36enc(target_backup_id));
165165
else
166166
/* Try to find another backup that satisfies target options */
@@ -175,8 +175,16 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
175175
}
176176
}
177177

178+
/* TODO: Show latest possible target */
178179
if (dest_backup==NULL)
179-
elog(ERROR,"Backup satisfying target options is not found.");
180+
{
181+
/* Failed to find target backup */
182+
if (target_backup_id)
183+
elog(ERROR,"Requested backup %s is not found.",base36enc(target_backup_id));
184+
else
185+
elog(ERROR,"Backup satisfying target options is not found.");
186+
/* TODO: check if user asked PITR or just restore of latest backup */
187+
}
180188

181189
/* If we already found dest_backup, look for full backup. */
182190
if (dest_backup->backup_mode==BACKUP_MODE_FULL)
@@ -954,6 +962,7 @@ read_timeline_history(TimeLineID targetTLI)
954962
returnresult;
955963
}
956964

965+
/* TODO: do not ignore timelines. What if requested target located in different timeline? */
957966
bool
958967
satisfy_recovery_target(constpgBackup*backup,constpgRecoveryTarget*rt)
959968
{
@@ -969,6 +978,7 @@ satisfy_recovery_target(const pgBackup *backup, const pgRecoveryTarget *rt)
969978
return true;
970979
}
971980

981+
/* TODO description */
972982
bool
973983
satisfy_timeline(constparray*timelines,constpgBackup*backup)
974984
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp