@@ -47,7 +47,8 @@ parse_page(const DataPage *page, XLogRecPtr *lsn)
47
47
48
48
static void
49
49
backup_data_page (pgFile * file , const XLogRecPtr * lsn ,
50
- BlockNumber blknum , FILE * in , FILE * out ,
50
+ BlockNumber blknum , BlockNumber nblocks ,
51
+ FILE * in , FILE * out ,
51
52
pg_crc32 * crc )
52
53
{
53
54
BackupPageHeader header ;
@@ -72,8 +73,8 @@ backup_data_page(pgFile *file, const XLogRecPtr *lsn,
72
73
73
74
read_len = fread (& page , 1 , sizeof (page ), in );
74
75
if (read_len != sizeof (page ))
75
- elog (ERROR , "File: %s, block size of block %u is incorrect %lu" ,
76
- file -> path , blknum , read_len );
76
+ elog (ERROR , "File: %s, block size of block %u of nblocks %u is incorrect %lu" ,
77
+ file -> path , blknum , nblocks , read_len );
77
78
78
79
/*
79
80
* If an invalid data page was found, fallback to simple copy to ensure
@@ -223,14 +224,14 @@ backup_data_file(const char *from_root, const char *to_root,
223
224
if (file -> pagemap .bitmapsize == 0 )
224
225
{
225
226
for (blknum = 0 ; blknum < nblocks ; blknum ++ )
226
- backup_data_page (file , lsn , blknum , in , out , & crc );
227
+ backup_data_page (file , lsn , blknum , nblocks , in , out , & crc );
227
228
}
228
229
else
229
230
{
230
231
datapagemap_iterator_t * iter ;
231
232
iter = datapagemap_iterate (& file -> pagemap );
232
233
while (datapagemap_next (iter , & blknum ))
233
- backup_data_page (file , lsn , blknum , in , out , & crc );
234
+ backup_data_page (file , lsn , blknum , nblocks , in , out , & crc );
234
235
235
236
pg_free (iter );
236
237
/*
0 commit comments