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

Commit9e79ca3

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 parentcb86785 commit9e79ca3

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
@@ -2418,18 +2418,15 @@ pre_sync_fname(const char *fname, bool isdir, int elevel)
24182418
{
24192419
if (errno==EACCES|| (isdir&&errno==EISDIR))
24202420
return;
2421-
2422-
#ifdefETXTBSY
2423-
if (errno==ETXTBSY)
2424-
return;
2425-
#endif
2426-
24272421
ereport(elevel,
24282422
(errcode_for_file_access(),
24292423
errmsg("could not open file \"%s\": %m",fname)));
24302424
return;
24312425
}
24322426

2427+
/*
2428+
* We ignore errors from pg_flush_data() because this is only a hint.
2429+
*/
24332430
(void)pg_flush_data(fd,0,0);
24342431

24352432
(void)close(fd);
@@ -2473,12 +2470,6 @@ fsync_fname_ext(const char *fname, bool isdir, int elevel)
24732470
{
24742471
if (errno==EACCES|| (isdir&&errno==EISDIR))
24752472
return;
2476-
2477-
#ifdefETXTBSY
2478-
if (errno==ETXTBSY)
2479-
return;
2480-
#endif
2481-
24822473
ereport(elevel,
24832474
(errcode_for_file_access(),
24842475
errmsg("could not open file \"%s\": %m",fname)));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp