File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 11
11
* as a service.
12
12
*
13
13
* IDENTIFICATION
14
- * $PostgreSQL: pgsql/src/port/copydir.c,v 1.31 2010/02/22 15:29:46 tgl Exp $
14
+ * $PostgreSQL: pgsql/src/port/copydir.c,v 1.32 2010/02/23 05:44:55 tgl Exp $
15
15
*
16
16
*-------------------------------------------------------------------------
17
17
*/
@@ -221,16 +221,14 @@ static void
221
221
fsync_fname (char * fname )
222
222
{
223
223
int fd = BasicOpenFile (fname ,
224
- O_RDONLY | PG_BINARY ,
224
+ O_RDWR | PG_BINARY ,
225
225
S_IRUSR | S_IWUSR );
226
226
227
227
if (fd < 0 )
228
228
ereport (ERROR ,
229
229
(errcode_for_file_access (),
230
230
errmsg ("could not open file \"%s\": %m" , fname )));
231
231
232
- errno = 0 ;
233
-
234
232
if (pg_fsync (fd ) != 0 )
235
233
ereport (ERROR ,
236
234
(errcode_for_file_access (),
You can’t perform that action at this time.
0 commit comments