@@ -1212,7 +1212,8 @@ restore_non_data_file(parray *parent_chain, pgBackup *dest_backup,
1212
1212
{
1213
1213
/* In case of incremental restore truncate file just to be safe */
1214
1214
if (already_exists && fio_ftruncate (out , 0 ))
1215
- elog (ERROR , "Cannot truncate file \"%s\": %s" , strerror (errno ));
1215
+ elog (ERROR , "Cannot truncate file \"%s\": %s" ,
1216
+ to_fullpath , strerror (errno ));
1216
1217
return 0 ;
1217
1218
}
1218
1219
@@ -1233,9 +1234,10 @@ restore_non_data_file(parray *parent_chain, pgBackup *dest_backup,
1233
1234
elog (ERROR , "Failed to locate a full copy of nonedata file \"%s\"" , to_fullpath );
1234
1235
1235
1236
if (tmp_file -> write_size <= 0 )
1236
- elog (ERROR , "Full copy of nonedata file has invalid size. "
1237
+ elog (ERROR , "Full copy of nonedata file has invalid size: %li . "
1237
1238
"Metadata corruption in backup %s in file: \"%s\"" ,
1238
- base36enc (tmp_backup -> start_time ), to_fullpath );
1239
+ tmp_file -> write_size , base36enc (tmp_backup -> start_time ),
1240
+ to_fullpath );
1239
1241
1240
1242
/* incremental restore */
1241
1243
if (already_exists )
@@ -1245,14 +1247,15 @@ restore_non_data_file(parray *parent_chain, pgBackup *dest_backup,
1245
1247
1246
1248
if (file_crc == tmp_file -> crc )
1247
1249
{
1248
- elog (VERBOSE , "Remote nonedata file \"%s\" is unchanged , skip restore" ,
1250
+ elog (VERBOSE , "Already existing nonedata file \"%s\" has the same checksum , skip restore" ,
1249
1251
to_fullpath );
1250
1252
return 0 ;
1251
1253
}
1252
1254
1253
1255
/* Checksum mismatch, truncate file and overwrite it */
1254
1256
if (fio_ftruncate (out , 0 ))
1255
- elog (ERROR , "Cannot truncate file \"%s\": %s" , strerror (errno ));
1257
+ elog (ERROR , "Cannot truncate file \"%s\": %s" ,
1258
+ to_fullpath , strerror (errno ));
1256
1259
}
1257
1260
1258
1261
if (tmp_file -> external_dir_num == 0 )
0 commit comments