Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validate issue if segment size greater than 4GB. #638

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/pg_probackup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down