@@ -67,28 +67,31 @@ do_add_instance(InstanceConfig *instance)
67
67
68
68
/* Ensure that all root directories already exist */
69
69
if (access (backup_path , F_OK ) != 0 )
70
- elog (ERROR , "%s directory does not exist. " , backup_path );
70
+ elog (ERROR , "Directory does not exist: '%s' " , backup_path );
71
71
72
72
join_path_components (path , backup_path , BACKUPS_DIR );
73
73
if (access (path , F_OK ) != 0 )
74
- elog (ERROR , "%s directory does not exist. " , path );
74
+ elog (ERROR , "Directory does not exist: '%s' " , path );
75
75
76
76
join_path_components (arclog_path_dir , backup_path , "wal" );
77
77
if (access (arclog_path_dir , F_OK ) != 0 )
78
- elog (ERROR , "%s directory does not exist. " , arclog_path_dir );
78
+ elog (ERROR , "Directory does not exist: '%s' " , arclog_path_dir );
79
79
80
- /* Create directory for data files of this specific instance */
81
80
if (stat (instance -> backup_instance_path , & st ) == 0 && S_ISDIR (st .st_mode ))
82
- elog (ERROR , "instance '%s' already exists" , instance -> backup_instance_path );
83
- dir_create_dir ( instance -> backup_instance_path , DIR_PERMISSION );
81
+ elog (ERROR , "Instance '%s' backup directory already exists: '%s'" ,
82
+ instance -> name , instance -> backup_instance_path );
84
83
85
84
/*
86
85
* Create directory for wal files of this specific instance.
87
86
* Existence check is extra paranoid because if we don't have such a
88
87
* directory in data dir, we shouldn't have it in wal as well.
89
88
*/
90
89
if (stat (instance -> arclog_path , & st ) == 0 && S_ISDIR (st .st_mode ))
91
- elog (ERROR , "arclog_path '%s' already exists" , instance -> arclog_path );
90
+ elog (ERROR , "Instance '%s' WAL archive directory already exists: '%s'" ,
91
+ instance -> name , instance -> arclog_path );
92
+
93
+ /* Create directory for data files of this specific instance */
94
+ dir_create_dir (instance -> backup_instance_path , DIR_PERMISSION );
92
95
dir_create_dir (instance -> arclog_path , DIR_PERMISSION );
93
96
94
97
/*
0 commit comments