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

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ThinkJ001 wants to merge1 commit intopostgrespro:master
base:master
Choose a base branch
Loading
fromThinkJ001:master

Conversation

ThinkJ001
Copy link

If we use segsize>4GB, e.g.
./configure --prefix=/store2/Workspace/bin/pg16 --enable-debug --with-segsize=5 CFLAGS=-O2
the backup or restore will be failed in the validate step:

INFO: Database backup startINFO: wait for pg_backup_start()2024-10-17 09:08:02.750 CST [2271890] LOG:  checkpoint starting: immediate force wait2024-10-17 09:08:02.805 CST [2271890] LOG:  checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 21 recycled; write=0.001 s, sync=0.005 s, total=0.056 s; sync files=3, longest=0.003 s, average=0.002 s; distance=339967 kB, estimate=521292 kB; lsn=3/51000060, redo lsn=3/51000028INFO: Wait for WAL segment /store2/Workspace/data/probackup/backups/pg16/SLH75E/database/pg_wal/000000010000000300000051 to be streamedINFO: PGDATA size: 15GBINFO: Current Start LSN: 3/51000028, TLI: 1INFO: Start transferring data filesINFO: Data files are transferred, time elapsed: 19s2024-10-17 09:08:22.381 CST [2271938] LOG:  restore point "pg_probackup, backup_id SLH75E" created at 3/510001782024-10-17 09:08:22.381 CST [2271938] STATEMENT:  SELECT pg_catalog.pg_create_restore_point($1)INFO: wait for pg_stop_backup()INFO: pg_stop backup() successfully executedINFO: stop_lsn: 3/510001A0INFO: Getting the Recovery Time from WALINFO: Syncing backup files to diskINFO: Backup files are synced, time elapsed: 4sINFO: Validating backup SLH75EERROR: Cannot seek block 261889 of "/store2/Workspace/data/probackup/backups/pg16/SLH75E/database/base/5/24632": Invalid argumentERROR: Data files validation failed

The reason is the block and pos parameter in struct BackupPageHeader2 declared as int32, and when datafile exceed 4G, the variables will overflow.

This patch fixed this issue.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@ThinkJ001

[8]ページ先頭

©2009-2025 Movatter.jp