1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-28 09:33:54 +02:00

Fix validate issue if segment size greater than 4GB.

This commit is contained in:
zhangchenxi 2024-10-17 14:28:58 +08:00
parent a2510f5fa1
commit 2ce40339d5
2 changed files with 4 additions and 4 deletions

View File

@ -1132,7 +1132,7 @@ restore_data_file_internal(FILE *in, FILE *out, pgFile *file, uint32 backup_vers
cur_pos_in != headers[n_hdr].pos)
{
if (fseek(in, headers[n_hdr].pos, SEEK_SET) != 0)
elog(ERROR, "Cannot seek to offset %u of \"%s\": %s",
elog(ERROR, "Cannot seek to offset %lu of \"%s\": %s",
headers[n_hdr].pos, from_fullpath, strerror(errno));
cur_pos_in = headers[n_hdr].pos;
@ -1695,7 +1695,7 @@ validate_file_pages(pgFile *file, const char *fullpath, XLogRecPtr stop_lsn,
elog(ERROR, "Cannot seek block %u of \"%s\": %s",
blknum, fullpath, strerror(errno));
else
elog(VERBOSE, "Seek to %u", headers[n_hdr].pos);
elog(VERBOSE, "Seek to %lu", headers[n_hdr].pos);
cur_pos_in = headers[n_hdr].pos;
}

View File

@ -704,8 +704,8 @@ typedef struct BackupPageHeader
typedef struct BackupPageHeader2
{
XLogRecPtr lsn;
int32 block; /* block number */
int32 pos; /* position in backup file */
BlockNumber block; /* block number */
off_t pos; /* position in backup file */
uint16 checksum;
} BackupPageHeader2;