Re: pg_preadv() and pg_pwritev()

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_preadv() and pg_pwritev()
Date: 2021-01-12 23:40:59
Message-ID: CA+hUKGL57RvoQsS35TVPnQoPYqbtBixsdRhynB8NpcUKpHTTtg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 11, 2021 at 3:59 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Mon, Jan 11, 2021 at 3:34 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2021-01-13 01:09:19 Re: WIP: BRIN multi-range indexes
Previous Message Alvaro Herrera 2021-01-12 23:22:19 Re: pg_dump INDEX ATTACH versus --clean option