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

Commit77642a8

Browse files
committed
Remove special cases for ETXTBSY from new fsync'ing logic.
The argument that this is a sufficiently-expected case to be silentlyignored seems pretty thin. Andres had brought it up back when we werestill considering that most fsync failures should be hard errors, and itprobably would be legit not to fail hard for ETXTBSY --- but the same istrue for EROFS and other cases, which is why we gave up on hard failures.ETXTBSY is surely not a normal case, so logging the failure seems finefrom here.
1 parentaa8377e commit77642a8

File tree

1 file changed

+3
-12
lines changed
  • src/backend/storage/file

1 file changed

+3
-12
lines changed

‎src/backend/storage/file/fd.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,18 +2477,15 @@ pre_sync_fname(const char *fname, bool isdir, int elevel)
24772477
{
24782478
if (errno==EACCES|| (isdir&&errno==EISDIR))
24792479
return;
2480-
2481-
#ifdefETXTBSY
2482-
if (errno==ETXTBSY)
2483-
return;
2484-
#endif
2485-
24862480
ereport(elevel,
24872481
(errcode_for_file_access(),
24882482
errmsg("could not open file \"%s\": %m",fname)));
24892483
return;
24902484
}
24912485

2486+
/*
2487+
* We ignore errors from pg_flush_data() because this is only a hint.
2488+
*/
24922489
(void)pg_flush_data(fd,0,0);
24932490

24942491
(void)close(fd);
@@ -2532,12 +2529,6 @@ fsync_fname_ext(const char *fname, bool isdir, int elevel)
25322529
{
25332530
if (errno==EACCES|| (isdir&&errno==EISDIR))
25342531
return;
2535-
2536-
#ifdefETXTBSY
2537-
if (errno==ETXTBSY)
2538-
return;
2539-
#endif
2540-
25412532
ereport(elevel,
25422533
(errcode_for_file_access(),
25432534
errmsg("could not open file \"%s\": %m",fname)));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp