diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-02-22 15:26:14 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-02-22 15:26:14 +0000 |
commit | e9a383303ce2f47a2733419e8d23e9e5a20b5ff2 (patch) | |
tree | e2e1374ca4fab6c7e2e00f2cd146444d1725fa7c /src | |
parent | 3229db2d42969a4cc6434cb612ca03a19e661b43 (diff) | |
download | postgresql-e9a383303ce2f47a2733419e8d23e9e5a20b5ff2.tar.gz postgresql-e9a383303ce2f47a2733419e8d23e9e5a20b5ff2.zip |
Adjust pg_fsync_writethrough so that it will set errno when failing
on a platform that doesn't support this operation. The former coding
would allow an unrelated errno to be reported, which would be quite
misleading. Not sure if this has anything to do with the current
buildfarm failures, but it's certainly bogus as-is.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/storage/file/fd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index adea849ab05..06edf062c1b 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.154 2010/02/15 00:50:57 stark Exp $ + * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.155 2010/02/22 15:26:14 tgl Exp $ * * NOTES: * @@ -292,6 +292,7 @@ pg_fsync_writethrough(int fd) #elif defined(F_FULLFSYNC) return (fcntl(fd, F_FULLFSYNC, 0) == -1) ? -1 : 0; #else + errno = ENOSYS; return -1; #endif } |