Re: Windows pg_basebackup unable to create >2GB pg_wal.tar tarballs ("could not close file: Invalid argument" when creating pg_wal.tar of size ~ 2^31 bytes) - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Windows pg_basebackup unable to create >2GB pg_wal.tar tarballs ("could not close file: Invalid argument" when creating pg_wal.tar of size ~ 2^31 bytes)
Date
Msg-id CA+hUKG+oo_g4-dcsZkGsmKHad4sOmkMOBctDPV1CEGWPFeeTwQ@mail.gmail.com
Whole thread Raw
Responses Re: Windows pg_basebackup unable to create >2GB pg_wal.tar tarballs ("could not close file: Invalid argument" when creating pg_wal.tar of size ~ 2^31 bytes)
List pgsql-hackers
On Thu, Nov 21, 2024 at 11:44 PM Jakub Wartak
<jakub.wartak@enterprisedb.com> wrote:
> This literally looks like something like off_t/size_t would be limited to 2^31 somewhere.

off_t is 32 bits on Windows.  I'd be quite suspicious of the
arithmetic involving 'currpos'.  What happens if you change all the
off_t in walmethods.c/.h to pgoff_t?  The lseek() is suspicious too,
and might need to be redirected to _lseeki64().



pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: Planner picks n² query plan when available
Next
From: Marcos Pegoraro
Date:
Subject: Re: Document NULL