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

Commit3b855b0

Browse files
author
Sokolov Yura
committed
cfs: prefsync original file without lock
durable_rename fsyncs old file. lets fsync it by ourself without lock.
1 parent069d5ba commit3b855b0

File tree

1 file changed

+7
-0
lines changed
  • src/backend/storage/file

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,13 @@ static bool cfs_gc_file(char* map_path, GC_CALL_KIND background)
994994
}
995995

996996
/* Persist bigger part of copy to not do it under lock */
997+
/* and persist previous file, cause it will be fsynced in durable rename */
998+
if (pg_fsync(fd)<0)
999+
{
1000+
elog(WARNING,"CFS failed to sync file %s: %m",file_bck_path);
1001+
gotoCleanup;
1002+
}
1003+
9971004
if (pg_fsync(fd2)<0)
9981005
{
9991006
elog(WARNING,"CFS failed to sync file %s: %m",file_bck_path);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp