mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
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
This commit is contained in:
@@ -431,6 +431,8 @@ extern ssize_t pg_pread(int fd, void *buf, size_t nbyte, off_t offset);
|
||||
extern ssize_t pg_pwrite(int fd, const void *buf, size_t nbyte, off_t offset);
|
||||
#endif
|
||||
|
||||
/* For pg_pwritev() and pg_preadv(), see port/pg_iovec.h. */
|
||||
|
||||
#if !HAVE_DECL_STRLCAT
|
||||
extern size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user