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

Commitfaee318

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 parentaf109e3 commitfaee318

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
@@ -192,7 +192,7 @@ static bool
192192
close_walfile(StreamCtl*stream,XLogRecPtrpos)
193193
{
194194
char*fn;
195-
off_tcurrpos;
195+
pgoff_tcurrpos;
196196
intr;
197197
charwalfile_name[MAXPGPATH];
198198

‎src/bin/pg_basebackup/walmethods.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ 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