Thomas Munro <thomas.munro@gmail.com> writes:
> OK, here's a patch to zero-fill fresh WAL segments with pwritev().
> I'm drawing a blank on trivial candidate uses for preadv(), without
> infrastructure from later patches.
This looks OK to me. I tried it on prairiedog (has writev and
pwrite but not pwritev) as well as gaur (has only writev).
They seem happy.
One minor thought is that in
+ struct iovec iov[Min(IOV_MAX, 1024)]; /* cap stack space */
it seems like pretty much every use of IOV_MAX would want some
similar cap. Should we centralize that idea with, say,
#define PG_IOV_MAX Min(IOV_MAX, 1024)
? Or will the plausible cap vary across uses?
regards, tom lane