default:
/* Shouldn't happen. */
- pg_fatal("unexpected state while parsing tar file");
+ pg_fatal("unexpected state while parsing tar archive");
}
}
if (m == NULL)
{
report_backup_error(mystreamer->context,
- "\"%s\" is present in \"%s\" but not in the manifest",
+ "file \"%s\" is present in archive \"%s\" but not in the manifest",
member->pathname, mystreamer->archive_name);
return;
}
if (m->size != member->size)
{
report_backup_error(mystreamer->context,
- "\"%s\" has size %llu in \"%s\" but size %" PRIu64 " in the manifest",
+ "file \"%s\" has size %llu in archive \"%s\" but size %" PRIu64 " in the manifest",
member->pathname,
(unsigned long long) member->size,
mystreamer->archive_name,
if (mystreamer->checksum_bytes != m->size)
{
report_backup_error(mystreamer->context,
- "file \"%s\" in \"%s\" should contain %" PRIu64 " bytes, but read %" PRIu64 " bytes",
+ "file \"%s\" in archive \"%s\" should contain %" PRIu64 " bytes, but %" PRIu64 " bytes were read",
m->pathname, mystreamer->archive_name,
m->size,
mystreamer->checksum_bytes);
/* And check it against the manifest. */
if (checksumlen != m->checksum_length)
report_backup_error(mystreamer->context,
- "file \"%s\" in \"%s\" has checksum of length %d, but expected %d",
+ "file \"%s\" in archive \"%s\" has checksum of length %d, but expected %d",
m->pathname, mystreamer->archive_name,
m->checksum_length, checksumlen);
else if (memcmp(checksumbuf, m->checksum_payload, checksumlen) != 0)
report_backup_error(mystreamer->context,
- "checksum mismatch for file \"%s\" in \"%s\"",
+ "checksum mismatch for file \"%s\" in archive \"%s\"",
m->pathname, mystreamer->archive_name);
}
if (!no_parse_wal && context.format == 't')
{
pg_log_error("pg_waldump cannot read tar files");
- pg_log_error_hint("You must use -n or --no-parse-wal when verifying a tar-format backup.");
+ pg_log_error_hint("You must use -n/--no-parse-wal when verifying a tar-format backup.");
exit(1);
}
return;
}
- /* If it's not a directory, it should be a plain file. */
+ /* If it's not a directory, it should be a regular file. */
if (!S_ISREG(sb.st_mode))
{
report_backup_error(context,
- "\"%s\" is not a file or directory",
+ "\"%s\" is not a regular file or directory",
relpath);
return;
}
return;
}
- /* In a tar format backup, we expect only plain files. */
+ /* In a tar format backup, we expect only regular files. */
if (!S_ISREG(sb.st_mode))
{
report_backup_error(context,
- "\"%s\" is not a plain file",
+ "file \"%s\" is not a regular file",
relpath);
return;
}
'name' => 'extra_file',
'mutilate' => \&mutilate_extra_file,
'fails_like' =>
- qr/extra_file.*present (on disk|in "[^"]+") but not in the manifest/
+ qr/extra_file.*present (on disk|in archive "[^"]+") but not in the manifest/
},
{
'name' => 'extra_tablespace_file',
'mutilate' => \&mutilate_extra_tablespace_file,
'fails_like' =>
- qr/extra_ts_file.*present (on disk|in "[^"]+") but not in the manifest/
+ qr/extra_ts_file.*present (on disk|in archive "[^"]+") but not in the manifest/
},
{
'name' => 'missing_file',
'mutilate' => \&mutilate_missing_file,
'fails_like' =>
- qr/pg_xact\/0000.*present in the manifest but not (on disk|in "[^"]+")/
+ qr/pg_xact\/0000.*present in the manifest but not (on disk|in archive "[^"]+")/
},
{
'name' => 'missing_tablespace',
'mutilate' => \&mutilate_missing_tablespace,
'fails_like' =>
- qr/pg_tblspc.*present in the manifest but not (on disk|in "[^"]+")/
+ qr/pg_tblspc.*present in the manifest but not (on disk|in archive "[^"]+")/
},
{
'name' => 'append_to_file',
'mutilate' => \&mutilate_append_to_file,
'fails_like' =>
- qr/has size \d+ (on disk|in "[^"]+") but size \d+ in the manifest/
+ qr/has size \d+ (on disk|in archive "[^"]+") but size \d+ in the manifest/
},
{
'name' => 'truncate_file',
'mutilate' => \&mutilate_truncate_file,
'fails_like' =>
- qr/has size 0 (on disk|in "[^"]+") but size \d+ in the manifest/
+ qr/has size 0 (on disk|in archive "[^"]+") but size \d+ in the manifest/
},
{
'name' => 'replace_file',
'--no-parse-wal',
$backup_path
],
- qr("pg_multixact" is not a plain file),
+ qr("pg_multixact" is not a regular file),
"does not verify with --format=tar --no-parse-wal");
# Test invalid options