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

Commit9bf3d8b

Browse files
author
Sokolov Yura
committed
cfs: reduce logging on forced GC.
1 parent8f9dbbc commit9bf3d8b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,9 +1681,10 @@ Datum cfs_gc_relation(PG_FUNCTION_ARGS)
16811681
}
16821682

16831683

1684-
voidcfs_gc_segment(charconst*fileName,booloptional)
1684+
voidcfs_gc_segment(charconst*fileName,uint32pos)
16851685
{
16861686
char*mapFileName;
1687+
booloptional=pos<CFS_RED_LINE;
16871688

16881689
if (optional)
16891690
{
@@ -1693,6 +1694,8 @@ void cfs_gc_segment(char const* fileName, bool optional)
16931694
else
16941695
LWLockAcquire(CfsGcLock,LW_EXCLUSIVE);/* Prevent interaction with background GC */
16951696

1697+
elog(LOG,"CFS: backend %d forced to perform GC on file %s because it's size exceed %u bytes",
1698+
MyProcPid,fileName,pos);
16961699
mapFileName=psprintf("%s.cfm",fileName);
16971700

16981701
cfs_gc_file(mapFileName,optional ?CFS_IMPLICIT :CFS_EXPLICIT);

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,9 +2155,7 @@ FileWrite(File file, char *buffer, int amount)
21552155
*/
21562156
if (pos+amount>CFS_IMPLICIT_GC_THRESHOLD)
21572157
{
2158-
elog(LOG,"CFS: backend %d forced to perform GC on file %s block %u because it's size exceed %u bytes",
2159-
MyProcPid,VfdCache[file].fileName, (uint32)(VfdCache[file].seekPos /BLCKSZ),pos);
2160-
cfs_gc_segment(VfdCache[file].fileName,pos+amount<CFS_RED_LINE);
2158+
cfs_gc_segment(VfdCache[file].fileName,pos+amount);
21612159
}
21622160
}
21632161
returnreturnCode;

‎src/include/storage/cfs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ int cfs_shmem_size(void);
136136
voidcfs_encrypt(constchar*fname,void*block,uint32offs,uint32size);
137137
voidcfs_decrypt(constchar*fname,void*block,uint32offs,uint32size);
138138

139-
voidcfs_gc_segment(charconst*name,booloptional);
139+
voidcfs_gc_segment(charconst*name,uint32pos);
140140
voidcfs_recover_map(FileMap*map);
141141

142142
externCfsState*cfs_state;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp