@@ -1035,7 +1035,7 @@ get_dbname_oid_list_from_mfile(const char *dumpdirpath, SimpleOidStringList *dbn
1035
1035
*/
1036
1036
if (!file_exists_in_directory (dumpdirpath , "map.dat" ))
1037
1037
{
1038
- pg_log_info ("databases restoring is skipped as map.dat file is not present in \"%s\"" , dumpdirpath );
1038
+ pg_log_info ("database restoring is skipped as \" map.dat\" is not present in \"%s\"" , dumpdirpath );
1039
1039
return 0 ;
1040
1040
}
1041
1041
@@ -1045,7 +1045,7 @@ get_dbname_oid_list_from_mfile(const char *dumpdirpath, SimpleOidStringList *dbn
1045
1045
pfile = fopen (map_file_path , PG_BINARY_R );
1046
1046
1047
1047
if (pfile == NULL )
1048
- pg_fatal ("could not open map.dat file: \"%s\"" , map_file_path );
1048
+ pg_fatal ("could not open \"%s\": %m " , map_file_path );
1049
1049
1050
1050
/* Append all the dbname/db_oid combinations to the list. */
1051
1051
while ((fgets (line , MAXPGPATH , pfile )) != NULL )
@@ -1064,11 +1064,13 @@ get_dbname_oid_list_from_mfile(const char *dumpdirpath, SimpleOidStringList *dbn
1064
1064
/* Remove \n from dbname. */
1065
1065
dbname [strlen (dbname ) - 1 ] = '\0' ;
1066
1066
1067
- pg_log_info ("found database \"%s\" (OID: %u) in map.dat file while restoring." , dbname , db_oid );
1067
+ pg_log_info ("found database \"%s\" (OID: %u) in \"%s\"" ,
1068
+ dbname , db_oid , map_file_path );
1068
1069
1069
1070
/* Report error and exit if the file has any corrupted data. */
1070
1071
if (!OidIsValid (db_oid ) || strlen (dbname ) == 0 )
1071
- pg_fatal ("invalid entry in map.dat file at line : %d" , count + 1 );
1072
+ pg_fatal ("invalid entry in \"%s\" at line : %d" , map_file_path ,
1073
+ count + 1 );
1072
1074
1073
1075
simple_oid_string_list_append (dbname_oid_list , db_oid , dbname );
1074
1076
count ++ ;
@@ -1116,7 +1118,7 @@ restore_all_databases(PGconn *conn, const char *dumpdirpath,
1116
1118
if (dbname_oid_list .head == NULL )
1117
1119
return process_global_sql_commands (conn , dumpdirpath , opts -> filename );
1118
1120
1119
- pg_log_info ("found total %d database names in map.dat file " , num_total_db );
1121
+ pg_log_info ("found %d database names in \" map.dat\" " , num_total_db );
1120
1122
1121
1123
if (!conn )
1122
1124
{
@@ -1288,7 +1290,7 @@ process_global_sql_commands(PGconn *conn, const char *dumpdirpath, const char *o
1288
1290
pfile = fopen (global_file_path , PG_BINARY_R );
1289
1291
1290
1292
if (pfile == NULL )
1291
- pg_fatal ("could not open global.dat file: \"%s\"" , global_file_path );
1293
+ pg_fatal ("could not open \"%s\": %m " , global_file_path );
1292
1294
1293
1295
/*
1294
1296
* If outfile is given, then just copy all global.dat file data into
@@ -1335,7 +1337,7 @@ process_global_sql_commands(PGconn *conn, const char *dumpdirpath, const char *o
1335
1337
1336
1338
/* Print a summary of ignored errors during global.dat. */
1337
1339
if (n_errors )
1338
- pg_log_warning ("errors ignored on global.dat file restore: %d" , n_errors );
1340
+ pg_log_warning ("ignored %d errors in \"%s\"" , n_errors , global_file_path );
1339
1341
1340
1342
fclose (pfile );
1341
1343
0 commit comments