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

Commit970b97e

Browse files
committed
Fix off_t overflow in pg_basebackup on Windows.
walmethods.c used off_t to navigate around a pg_wal.tar file that couldexceed 2GB, which doesn't work on Windows and would fail with misleadingerrors. Use pgoff_t instead.Back-patch to all supported branches.Author: Davinder Singh <davinder.singh@enterprisedb.com>Reported-by: Jakub Wartak <jakub.wartak@enterprisedb.com>Discussion:https://postgr.es/m/CAKZiRmyM4YnokK6Oenw5JKwAQ3rhP0YTz2T-tiw5dAQjGRXE3Q%40mail.gmail.com
1 parent026762d commit970b97e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎src/bin/pg_basebackup/receivelog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static bool
191191
close_walfile(StreamCtl*stream,XLogRecPtrpos)
192192
{
193193
char*fn;
194-
off_tcurrpos;
194+
pgoff_tcurrpos;
195195
intr;
196196
charwalfile_name[MAXPGPATH];
197197

‎src/bin/pg_basebackup/walmethods.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ static const WalWriteMethodOps WalTarMethodOps = {
691691
typedefstructTarMethodFile
692692
{
693693
Walfilebase;
694-
off_tofs_start;/* Where does the *header* for this file start */
694+
pgoff_tofs_start;/* Where does the *header* for this file start */
695695
charheader[TAR_BLOCK_SIZE];
696696
size_tpad_to_size;
697697
}TarMethodFile;

‎src/bin/pg_basebackup/walmethods.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ typedef struct WalWriteMethod WalWriteMethod;
1717
typedefstruct
1818
{
1919
WalWriteMethod*wwmethod;
20-
off_tcurrpos;
20+
pgoff_tcurrpos;
2121
char*pathname;
2222

2323
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp