From 970b97eeb8f036e534abe183fd41604671f7674d Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Thu, 9 Jan 2025 13:17:36 +1300 Subject: Fix off_t overflow in pg_basebackup on Windows. walmethods.c used off_t to navigate around a pg_wal.tar file that could exceed 2GB, which doesn't work on Windows and would fail with misleading errors. Use pgoff_t instead. Back-patch to all supported branches. Author: Davinder Singh Reported-by: Jakub Wartak Discussion: https://postgr.es/m/CAKZiRmyM4YnokK6Oenw5JKwAQ3rhP0YTz2T-tiw5dAQjGRXE3Q%40mail.gmail.com --- src/bin/pg_basebackup/walmethods.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bin/pg_basebackup/walmethods.h') diff --git a/src/bin/pg_basebackup/walmethods.h b/src/bin/pg_basebackup/walmethods.h index 77eb0f08f3e..f7a6dc18439 100644 --- a/src/bin/pg_basebackup/walmethods.h +++ b/src/bin/pg_basebackup/walmethods.h @@ -17,7 +17,7 @@ typedef struct WalWriteMethod WalWriteMethod; typedef struct { WalWriteMethod *wwmethod; - off_t currpos; + pgoff_t currpos; char *pathname; /* -- cgit v1.2.3