We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97322d2 commit 220f637Copy full SHA for 220f637
src/backend/storage/file/cfs.c
@@ -1053,6 +1053,13 @@ static bool cfs_gc_file(char* map_path, GC_CALL_KIND background)
1053
goto Cleanup;
1054
}
1055
newMap->inodes[i] = CFS_INODE(size, offs);
1056
+
1057
+ if (writeback + 16*1024*1024 < newSize)
1058
+ {
1059
+ uint32 newwb = (newSize - 128*1024) & ~(128*1024-1);
1060
+ pg_flush_data(fd2, writeback, newwb - writeback);
1061
+ writeback = newwb;
1062
+ }
1063
1064
else
1065
{
@@ -1061,6 +1068,7 @@ static bool cfs_gc_file(char* map_path, GC_CALL_KIND background)
1068
cfs_state->gc_stat.processedBytes += size;
1069
cfs_state->gc_stat.processedPages += 1;
1070
1071
+ pg_flush_data(fd2, writeback, newSize);
1072
1073
if (close(fd) < 0)
1066
1074
0 commit comments