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)

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Davinder Singh <davinder(dot)singh(at)enterprisedb(dot)com>, Dilip Kumar <dilip(dot)kumar(at)enterprisedb(dot)com>
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: 2024-11-21 13:38:09
Message-ID: CA+hUKG+oo_g4-dcsZkGsmKHad4sOmkMOBctDPV1CEGWPFeeTwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 21, 2024 at 11:44 PM Jakub Wartak
<jakub(dot)wartak(at)enterprisedb(dot)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().

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marcos Pegoraro 2024-11-21 13:49:52 Re: Document NULL
Previous Message Matthias van de Meent 2024-11-21 12:58:43 Re: Planner picks n² query plan when available