mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-12-03 09:59:53 +02:00
PGPRO-1159: Do not throw an error if file was truncated
This commit is contained in:
parent
a00fdafcec
commit
6878de124a
@ -140,7 +140,7 @@ backup_data_page(pgFile *file, XLogRecPtr prev_backup_start_lsn,
|
|||||||
/*
|
/*
|
||||||
* Read the page and verify its header and checksum.
|
* Read the page and verify its header and checksum.
|
||||||
* Under high write load it's possible that we've read partly
|
* Under high write load it's possible that we've read partly
|
||||||
* flushed page, so try several times befor throwing an error.
|
* flushed page, so try several times before throwing an error.
|
||||||
*/
|
*/
|
||||||
while(try_checksum--)
|
while(try_checksum--)
|
||||||
{
|
{
|
||||||
@ -152,6 +152,13 @@ backup_data_page(pgFile *file, XLogRecPtr prev_backup_start_lsn,
|
|||||||
|
|
||||||
if (read_len != BLCKSZ)
|
if (read_len != BLCKSZ)
|
||||||
{
|
{
|
||||||
|
if (read_len == 0)
|
||||||
|
{
|
||||||
|
elog(LOG, "File %s, block %u, file was truncated",
|
||||||
|
file->path, blknum);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
elog(ERROR, "File: %s, invalid block size of block %u : %lu",
|
elog(ERROR, "File: %s, invalid block size of block %u : %lu",
|
||||||
file->path, blknum, read_len);
|
file->path, blknum, read_len);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user