Provide pg_preadv() and pg_pwritev().

Thomas Munro <tmunro@postgresql.org>

Commit: 13a021f3e8c99915b3cc0cb2021a948d9c71ff32
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2021-01-11T02:24:38Z
Releases: 14.0
Provide pg_preadv() and pg_pwritev().

Provide synchronous vectored file I/O routines.  These map to preadv()
and pwritev(), with fallback implementations for systems that don't have
them.  Also provide a wrapper pg_pwritev_with_retry() that automatically
retries on short writes.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA%2BhUKGJA%2Bu-220VONeoREBXJ9P3S94Y7J%2BkqCnTYmahvZJwM%3Dg%40mail.gmail.com

Files

PathChange+/−
configure modified +2 −28
configure.ac modified +7 −2
src/include/pg_config.h.in modified +15 −0
src/include/port.h modified +2 −0
src/include/port/pg_iovec.h added +59 −0
src/port/Makefile modified +2 −0
src/port/pread.c modified +41 −2
src/port/pwrite.c modified +105 −2
src/tools/msvc/Solution.pm modified +5 −0

Discussion