Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit96fe569

Browse files
committed
Add nblocks into error message
1 parent42369f4 commit96fe569

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎data.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ parse_page(const DataPage *page, XLogRecPtr *lsn)
4747

4848
staticvoid
4949
backup_data_page(pgFile*file,constXLogRecPtr*lsn,
50-
BlockNumberblknum,FILE*in,FILE*out,
50+
BlockNumberblknum,BlockNumbernblocks,
51+
FILE*in,FILE*out,
5152
pg_crc32*crc)
5253
{
5354
BackupPageHeaderheader;
@@ -72,8 +73,8 @@ backup_data_page(pgFile *file, const XLogRecPtr *lsn,
7273

7374
read_len=fread(&page,1,sizeof(page),in);
7475
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 %uof nblocks %uis incorrect %lu",
77+
file->path,blknum,nblocks,read_len);
7778

7879
/*
7980
* 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,
223224
if (file->pagemap.bitmapsize==0)
224225
{
225226
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);
227228
}
228229
else
229230
{
230231
datapagemap_iterator_t*iter;
231232
iter=datapagemap_iterate(&file->pagemap);
232233
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);
234235

235236
pg_free(iter);
236237
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp