File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 308
308
As it was mentioned before, CFS always appends updated blocks to the end of the compressed file. So physical size of the file
309
309
can be greater than used size in this file. I.e. CFS file is fragmented and defragmentation is periodically performed by CFS
310
310
garbage collector. <varname>cfs_fragmentation(relation)</varname> functions returns average fragmentation of relation files.
311
- It is calculated as rum of physical sizes of the files divided by sum of used size of the files.
311
+ It is calculated as sum of physical sizes of the files minus sum of used size of the files divided by sum of physical sizes of the files.
312
312
</para>
313
313
314
314
<para>
Original file line number Diff line number Diff line change @@ -1064,7 +1064,7 @@ Datum cfs_fragmentation(PG_FUNCTION_ARGS)
1064
1064
pfree (map_path );
1065
1065
relation_close (rel , AccessShareLock );
1066
1066
}
1067
- PG_RETURN_FLOAT8 ((double )physSize / usedSize );
1067
+ PG_RETURN_FLOAT8 ((double )( physSize - usedSize )/ physSize );
1068
1068
}
1069
1069
1070
1070
Datum cfs_gc_activity_processed_bytes (PG_FUNCTION_ARGS )
You can’t perform that action at this time.
0 commit comments