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

Commitbf2f20c

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 parente4a04e5 commitbf2f20c

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
@@ -2216,18 +2216,15 @@ pre_sync_fname(const char *fname, bool isdir, int elevel)
22162216
{
22172217
if (errno==EACCES|| (isdir&&errno==EISDIR))
22182218
return;
2219-
2220-
#ifdefETXTBSY
2221-
if (errno==ETXTBSY)
2222-
return;
2223-
#endif
2224-
22252219
ereport(elevel,
22262220
(errcode_for_file_access(),
22272221
errmsg("could not open file \"%s\": %m",fname)));
22282222
return;
22292223
}
22302224

2225+
/*
2226+
* We ignore errors from pg_flush_data() because this is only a hint.
2227+
*/
22312228
(void)pg_flush_data(fd,0,0);
22322229

22332230
(void)close(fd);
@@ -2271,12 +2268,6 @@ fsync_fname_ext(const char *fname, bool isdir, int elevel)
22712268
{
22722269
if (errno==EACCES|| (isdir&&errno==EISDIR))
22732270
return;
2274-
2275-
#ifdefETXTBSY
2276-
if (errno==ETXTBSY)
2277-
return;
2278-
#endif
2279-
22802271
ereport(elevel,
22812272
(errcode_for_file_access(),
22822273
errmsg("could not open file \"%s\": %m",fname)));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp