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)
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().