Skip to content

Commit ee3e8d1

Browse files
committed
[Issue #165] Report errno correctly when failed to access instance directory
1 parent fc81de2 commit ee3e8d1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pg_probackup.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,14 @@ main(int argc, char *argv[])
497497
if (backup_subcmd != INIT_CMD && backup_subcmd != ADD_INSTANCE_CMD)
498498
{
499499
if (fio_access(backup_instance_path, F_OK, FIO_BACKUP_HOST) != 0)
500+
{
501+
elog(WARNING, "Failed to access directory \"%s\": %s",
502+
backup_instance_path, strerror(errno));
503+
504+
// TODO: redundant message, should we get rid of it?
500505
elog(ERROR, "Instance '%s' does not exist in this backup catalog",
501506
instance_name);
507+
}
502508
}
503509
}
504510

0 commit comments

Comments
 (0)