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 aQ0djavBB5G4QMbS@paquier.xyz
Whole thread Raw
In response to Re: [Patch] Windows relation extension failure at 2GB and 4GB  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Thu, Nov 06, 2025 at 12:45:30PM -0500, Andres Freund wrote:
> Could we add a testcase that actually exercises at least some of the
> codepaths? We presumably wouldn't want to actually write that much data, but
> it shouldn't be hard to write portable code to create a file with holes...

With something that relies on a pg_pwrite() and pg_pread(), that does
not sound like an issue to me.

FWIW, I have wanted a test module that does FS-level operations for
some time.  Here, we could just have thin wrappers of the write and
read calls and a give way for the tests to pass directly arguments to
them via a SQL function call.  That would be easier to extend
depending on what comes next.  Not sure that this is absolutely
mandatory for the sake of the proposal, though, but long-term that's
something we should do more to stress the portability of the code.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Manni Wood
Date:
Subject: Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement
Next
From: Michael Paquier
Date:
Subject: Re: [Patch] Windows relation extension failure at 2GB and 4GB