diff options
author | Thomas Munro <tmunro@postgresql.org> | 2021-01-14 11:10:24 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2021-01-14 11:16:59 +1300 |
commit | 0d56acfbaa799553c0c6ea350fd6e68d81025994 (patch) | |
tree | bff95bba3a6ba07ae52d2ce559dde0755e82a3eb /src/include | |
parent | 5a6f9bce8dabd371bdb4e3db5dda436f7f0a680f (diff) | |
download | postgresql-0d56acfbaa799553c0c6ea350fd6e68d81025994.tar.gz postgresql-0d56acfbaa799553c0c6ea350fd6e68d81025994.zip |
Move our p{read,write}v replacements into their own files.
macOS's ranlib issued a warning about an empty pread.o file with the
previous arrangement, on systems new enough to require no replacement
functions. Let's go back to using configure's AC_REPLACE_FUNCS system
to build and include each .o in the library only if it's needed, which
requires moving the *v() functions to their own files.
Also move the _with_retry() wrapper to a more permanent home.
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/1283127.1610554395%40sss.pgh.pa.us
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/storage/fd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index f2662a96fd7..c430072af61 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -45,6 +45,7 @@ #include <dirent.h> +struct iovec; /* avoid including port/pg_iovec.h here */ typedef int File; @@ -161,6 +162,10 @@ extern int durable_unlink(const char *fname, int loglevel); extern int durable_rename_excl(const char *oldfile, const char *newfile, int loglevel); extern void SyncDataDirectory(void); extern int data_sync_elevel(int elevel); +extern ssize_t pg_pwritev_with_retry(int fd, + const struct iovec *iov, + int iovcnt, + off_t offset); /* Filename components */ #define PG_TEMP_FILES_DIR "pgsql_tmp" |