Re: pg_preadv() and pg_pwritev() - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: pg_preadv() and pg_pwritev()
Date
Msg-id CA+hUKGL57RvoQsS35TVPnQoPYqbtBixsdRhynB8NpcUKpHTTtg@mail.gmail.com
Whole thread Raw
In response to Re: pg_preadv() and pg_pwritev()  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Mon, Jan 11, 2021 at 3:59 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Mon, Jan 11, 2021 at 3:34 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> > I pushed it with that name, and a couple more cosmetic changes.  I'll
> > keep an eye on the build farm.
>
> Since only sifaka has managed to return a result so far (nice CPU), I
> had plenty of time to notice that macOS Big Sur has introduced
> preadv/pwritev.  They were missing on Catalina[1].

The rest of buildfarm was OK with it too, but I learned of a small
problem through CI testing of another patch: it's not OK for
src/port/pwrite.c to do this:

            if (part > 0)
                elog(ERROR, "unexpectedly wrote more than requested");

... because now when I try to use pg_pwrite() in pg_test_fsync,
Windows fails to link:

libpgport.lib(pwrite.obj) : error LNK2019: unresolved external symbol
errstart referenced in function pg_pwritev_with_retry
[C:\projects\postgresql\pg_test_fsync.vcxproj]

I'll go and replace that with an assertion.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_dump INDEX ATTACH versus --clean option
Next
From: Tomas Vondra
Date:
Subject: Re: WIP: BRIN multi-range indexes