We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1180b64 commit c3a24e3Copy full SHA for c3a24e3
src/port/copydir.c
@@ -11,7 +11,7 @@
11
* as a service.
12
*
13
* IDENTIFICATION
14
- * $PostgreSQL: pgsql/src/port/copydir.c,v 1.31 2010/02/22 15:29:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/port/copydir.c,v 1.32 2010/02/23 05:44:55 tgl Exp $
15
16
*-------------------------------------------------------------------------
17
*/
@@ -221,16 +221,14 @@ static void
221
fsync_fname(char *fname)
222
{
223
int fd = BasicOpenFile(fname,
224
- O_RDONLY | PG_BINARY,
+ O_RDWR | PG_BINARY,
225
S_IRUSR | S_IWUSR);
226
227
if (fd < 0)
228
ereport(ERROR,
229
(errcode_for_file_access(),
230
errmsg("could not open file \"%s\": %m", fname)));
231
232
- errno = 0;
233
-
234
if (pg_fsync(fd) != 0)
235
236
0 commit comments