Re: [Patch] Windows relation extension failure at 2GB and 4GB

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Bryan Green <dbryan(dot)green(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [Patch] Windows relation extension failure at 2GB and 4GB
Date: 2025-11-07 02:12:58
Message-ID: aQ1VqpfasOecGNXX@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 07, 2025 at 02:45:32PM +1300, Thomas Munro wrote:
> Only MinGW + meson. MinGW + configure has 32-bit off_t as far as I
> can tell because we do:
>
> if test "$PORTNAME" != "win32"; then
> AC_SYS_LARGEFILE
> ...
>
> I don't personally know of any current Unix without LFS, they just
> vary on whether it's always on or you have to ask for it, as autoconf
> and meson know. But I suppose the check for oversized segments should
> use sizeof(off_t), not the OS's identity.

Yes, I was first wondering about the addition of a WIN32 check for
meson, but this is a much better idea for both ./configure and meson.

There is a cc.sizeof(), which I guess should be enough to report the
size of off_t, and fail if we try a size larger than 4GB for the
segment file when a 4-byte off_t is detected. It's something that I'd
rather backpatch first down to v16, before moving on with more pgoff_t
integration in the tree, mostly for history clarity. That's clearly
an oversight.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2025-11-07 02:39:42 Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects
Previous Message Thomas Munro 2025-11-07 01:59:20 Re: [PATCH] Fix socket handle inheritance on Windows