Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb29ab2

Browse files
committed
Minor header cleanup for the new iovec code.
Remove redundant function declaration and improve header comment in pg_iovec.h. Move the new declaration in fd.h next to a group of more similar functions.
1 parent fef5b47 commit fb29ab2

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/include/port/pg_iovec.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*-------------------------------------------------------------------------
22
*
33
* pg_iovec.h
4-
* Header for the vectored I/O functions in src/port/p{read,write}.c.
4+
* Header for vectored I/O functions, to use in place of <sys/uio.h>.
55
*
66
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
@@ -51,9 +51,4 @@ extern ssize_t pg_preadv(int fd, const struct iovec *iov, int iovcnt, off_t offs
5151
extern ssize_t pg_pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset);
5252
#endif
5353

54-
extern ssize_t pg_pwritev_with_retry(int fd,
55-
const struct iovec *iov,
56-
int iovcnt,
57-
off_t offset);
58-
5954
#endif /* PG_IOVEC_H */

src/include/storage/fd.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ extern int pg_fsync_no_writethrough(int fd);
154154
extern int pg_fsync_writethrough(int fd);
155155
extern int pg_fdatasync(int fd);
156156
extern void pg_flush_data(int fd, off_t offset, off_t amount);
157+
extern ssize_t pg_pwritev_with_retry(int fd,
158+
const struct iovec *iov,
159+
int iovcnt,
160+
off_t offset);
157161
extern int pg_truncate(const char *path, off_t length);
158162
extern void fsync_fname(const char *fname, bool isdir);
159163
extern int fsync_fname_ext(const char *fname, bool isdir, bool ignore_perm, int elevel);
@@ -162,10 +166,6 @@ extern int durable_unlink(const char *fname, int loglevel);
162166
extern int durable_rename_excl(const char *oldfile, const char *newfile, int loglevel);
163167
extern void SyncDataDirectory(void);
164168
extern int data_sync_elevel(int elevel);
165-
extern ssize_t pg_pwritev_with_retry(int fd,
166-
const struct iovec *iov,
167-
int iovcnt,
168-
off_t offset);
169169

170170
/* Filename components */
171171
#define PG_TEMP_FILES_DIR "pgsql_tmp"

0 commit comments

Comments
 (0)