Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9dd6c46

Browse files
committed
Let's try forcing errno to zero before issuing fsync. The current buildfarm
results claiming EBADF seem improbable enough that I'm not convinced fsyncis really returning that --- could it be failing to set errno at all?
1 parente9a3833 commit9dd6c46

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/port/copydir.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*as a service.
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/port/copydir.c,v 1.30 2010/02/2202:50:10 tgl Exp $
14+
* $PostgreSQL: pgsql/src/port/copydir.c,v 1.31 2010/02/2215:29:46 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -229,9 +229,12 @@ fsync_fname(char *fname)
229229
(errcode_for_file_access(),
230230
errmsg("could not open file \"%s\": %m",fname)));
231231

232+
errno=0;
233+
232234
if (pg_fsync(fd)!=0)
233235
ereport(ERROR,
234236
(errcode_for_file_access(),
235237
errmsg("could not fsync file \"%s\": %m",fname)));
238+
236239
close(fd);
237240
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp