@@ -33,13 +33,31 @@ do_init(CatalogState *catalogState)
33
33
}
34
34
35
35
/* create backup catalog root directory */
36
- dir_create_dir (catalogState -> catalog_path , DIR_PERMISSION , false);
36
+ results = dir_create_dir (catalogState -> catalog_path , DIR_PERMISSION , false);
37
+ if (results != 0 )
38
+ {
39
+ int errno_tmp = errno ;
40
+ elog (ERROR , "cannot create backup catalog root directory \"%s\": %s" ,
41
+ catalogState -> catalog_path , strerror (errno_tmp ));
42
+ }
37
43
38
44
/* create backup catalog data directory */
39
- dir_create_dir (catalogState -> backup_subdir_path , DIR_PERMISSION , false);
45
+ results = dir_create_dir (catalogState -> backup_subdir_path , DIR_PERMISSION , false);
46
+ if (results != 0 )
47
+ {
48
+ int errno_tmp = errno ;
49
+ elog (ERROR , "cannot create backup catalog data directory \"%s\": %s" ,
50
+ catalogState -> backup_subdir_path , strerror (errno_tmp ));
51
+ }
40
52
41
53
/* create backup catalog wal directory */
42
- dir_create_dir (catalogState -> wal_subdir_path , DIR_PERMISSION , false);
54
+ results = dir_create_dir (catalogState -> wal_subdir_path , DIR_PERMISSION , false);
55
+ if (results != 0 )
56
+ {
57
+ int errno_tmp = errno ;
58
+ elog (ERROR , "cannot create backup catalog wal directory \"%s\": %s" ,
59
+ catalogState -> wal_subdir_path , strerror (errno_tmp ));
60
+ }
43
61
44
62
elog (INFO , "Backup catalog '%s' successfully inited" , catalogState -> catalog_path );
45
63
return 0 ;
0 commit comments