Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d7b9fe0

Browse files
author
Arthur Zakirov
committed
Added tablespace-mapping option.
mkdirs.sh is not created now during backup. Tests were updated.
1 parent 102d50e commit d7b9fe0

12 files changed

+702
-345
lines changed

backup.c

+75-115
Large diffs are not rendered by default.

catalog.c

+6
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ pgBackupCreateDir(pgBackup *backup)
242242
char *subdirs[] = { DATABASE_DIR, NULL };
243243

244244
pgBackupGetPath(backup, path, lengthof(path), NULL);
245+
246+
if (!dir_is_empty(path))
247+
elog(ERROR, "backup destination is not empty \"%s\"", path);
248+
245249
dir_create_dir(path, DIR_PERMISSION);
246250

247251
/* create directories for actual backup files */
@@ -525,6 +529,8 @@ pgBackupGetPath(const pgBackup *backup, char *path, size_t len, const char *subd
525529
else
526530
snprintf(path, len, "%s/%s/%s", backup_path, BACKUPS_DIR, datetime);
527531
free(datetime);
532+
533+
make_native_path(path);
528534
}
529535

530536
void

0 commit comments

Comments
 (0)