Skip to content

Commit 8dc07e9

Browse files
committed
[PBCKP-314] create_backup_dir should not elog(ERROR) on existing directory.
1 parent c8baeae commit 8dc07e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/catalog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ pgBackupInitDir(pgBackup *backup, const char *backup_instance_path)
15211521
.mode = DIR_PERMISSION, .strict = false);
15221522
if ($haserr(err))
15231523
{
1524-
elog(ERROR, "Can not create backup directory: %s", $errmsg(err));
1524+
elog(ERROR, "Can not create backup subdirectory: %s", $errmsg(err));
15251525
}
15261526
}
15271527

@@ -1549,7 +1549,7 @@ create_backup_dir(pgBackup *backup, const char *backup_instance_path)
15491549
if (!$haserr(err))
15501550
{
15511551
backup->root_dir = pgut_strdup(path);
1552-
} else {
1552+
} else if (getErrno(err) != EEXIST) {
15531553
elog(ERROR, "Can not create backup directory: %s", $errmsg(err));
15541554
}
15551555

0 commit comments

Comments
 (0)