Re: [Patch] Windows relation extension failure at 2GB and 4GB - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [Patch] Windows relation extension failure at 2GB and 4GB
Date
Msg-id aQ1VqpfasOecGNXX@paquier.xyz
Whole thread Raw
In response to Re: [Patch] Windows relation extension failure at 2GB and 4GB  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: [Patch] Windows relation extension failure at 2GB and 4GB
List 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

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [PATCH] Fix socket handle inheritance on Windows
Next
From: Thomas Munro
Date:
Subject: Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects