On Wed, Nov 29, 2023 at 1:17 AM Thomas Munro <thomas.mu...@gmail.com> wrote: > Done. I like it, I just feel a bit bad about moving the p*v() > replacement functions around a couple of times already! I figured it > might as well be static inline even if we use the fallback (= Solaris > and Windows).
Just for the record, since I'd said things like the above a few times while writing about this stuff: Solaris 11.4.69 has gained preadv() and pwritev(). That's interesting because it means that there will soon be no liive Unixoid operating systems left without them, and the fallback code in src/include/port/pg_iovec.h will, in practice, be only for Windows. I wondered if that might have implications for how we code or comment stuff like that, but it still seems to make sense as we have it. (I don't think Windows can have a real synchronous implementation; the kernel knows how to do scatter/gather, a feature implemented specifically for databases, but only in asynchronous ("overlapped") + direct I/O mode, a difference I don't know how to hide at this level. In later AIO work we should be able to use it as intended, but not by pretending to be Unix like this.)