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

Skip to content

Commit b8edd16

Browse files
author
Arthur Zakirov
committed
Add LOG messages
1 parent 195530e commit b8edd16

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

restore.c

+12
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,8 @@ restore_directories(const char *pg_data_dir, const char *backup_dir)
410410
list_data_directories(dirs, backup_database_dir, true, false);
411411
read_tablespace_map(links, backup_dir);
412412

413+
elog(LOG, "restore directories and symlinks...");
414+
413415
for (i = 0; i < parray_num(dirs); i++)
414416
{
415417
pgFile *dir = (pgFile *) parray_get(dirs, i);
@@ -473,6 +475,14 @@ restore_directories(const char *pg_data_dir, const char *backup_dir)
473475
elog(ERROR, "restore destination is not empty \"%s\"",
474476
linked_path);
475477

478+
if (link_sep)
479+
elog(LOG, "create directory \"%s\" and symbolic link \"%.*s\"",
480+
linked_path,
481+
(int) (link_sep - relative_ptr), relative_ptr);
482+
else
483+
elog(LOG, "create directory \"%s\" and symbolic link \"%s\"",
484+
linked_path, relative_ptr);
485+
476486
/* Firstly, create linked directory */
477487
dir_create_dir(linked_path, DIR_PERMISSION);
478488
/* Create rest of directories */
@@ -499,6 +509,8 @@ restore_directories(const char *pg_data_dir, const char *backup_dir)
499509
}
500510
}
501511

512+
elog(LOG, "create directory \"%s\"", relative_ptr);
513+
502514
/* This is not symlink, create directory */
503515
join_path_components(to_path, pg_data_dir, relative_ptr);
504516
dir_create_dir(to_path, DIR_PERMISSION);

0 commit comments

Comments
 (0)