@@ -19641,7 +19641,151 @@ SELECT (pg_stat_file('filename')).modification;
19641
19641
</para>
19642
19642
19643
19643
</sect2>
19644
+ <sect2 id="functions-compression-control">
19645
+ <title>Compression Control Functions</title>
19644
19646
19647
+ <indexterm>
19648
+ <primary>cfs_start_gc</primary>
19649
+ </indexterm>
19650
+ <indexterm>
19651
+ <primary>cfs_enable_gc</primary>
19652
+ </indexterm>
19653
+ <indexterm>
19654
+ <primary>cfs_gc_relation</primary>
19655
+ </indexterm>
19656
+ <indexterm>
19657
+ <primary>cfs_version</primary>
19658
+ </indexterm>
19659
+ <indexterm>
19660
+ <primary>cfs_estimate</primary>
19661
+ </indexterm>
19662
+ <indexterm>
19663
+ <primary>cfs_compression_ratio</primary>
19664
+ </indexterm>
19665
+ <indexterm>
19666
+ <primary>cfs_fragmentation</primary>
19667
+ </indexterm>
19668
+ <indexterm>
19669
+ <primary>cfs_gc_activity_processed_bytes</primary>
19670
+ </indexterm>
19671
+ <indexterm>
19672
+ <primary>cfs_gc_activity_processed_pages</primary>
19673
+ </indexterm>
19674
+ <indexterm>
19675
+ <primary>cfs_gc_activity_processed_files</primary>
19676
+ </indexterm>
19677
+ <indexterm>
19678
+ <primary>cfs_gc_activity_scanned_files</primary>
19679
+ </indexterm>
19680
+
19681
+ <para>
19682
+ The functions shown in <xref linkend="functions-cfs-table"> provide information
19683
+ about CFS state and activity and control CFS garbage collection.
19684
+ </para>
19685
+
19686
+ <table id="functions-cfs-table">
19687
+ <title>Compression Control Functions</title>
19688
+ <tgroup cols="3">
19689
+ <thead>
19690
+ <row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry>
19691
+ </row>
19692
+ </thead>
19693
+
19694
+ <tbody>
19695
+ <row>
19696
+ <entry>
19697
+ <literal><function>cfs_start_gc(n_workers integer)</function></literal>
19698
+ </entry>
19699
+ <entry><type>integer</type></entry>
19700
+ <entry>Starts garbage collection using the specified number of workers.
19701
+ You can only run this function to start the garbage collection manually
19702
+ if background garbage collection is disabled.
19703
+ </entry>
19704
+ </row>
19705
+ <row>
19706
+ <entry>
19707
+ <literal><function>cfs_enable_gc(enabled boolean)</function></literal>
19708
+ </entry>
19709
+ <entry><type>boolean</type></entry>
19710
+ <entry>Enables/disables background garbage collection. Alternatively, you can use the <xref linkend="guc-cfs-gc"> configuration variable.
19711
+ </entry>
19712
+ </row>
19713
+ <row>
19714
+ <entry>
19715
+ <literal><function>cfs_gc_relation(rel regclass)</function></literal>
19716
+ </entry>
19717
+ <entry><type>integer</type></entry>
19718
+ <entry>Performs garbage collection for a particular table. This function returns the number of processed segments.
19719
+ </entry>
19720
+ </row>
19721
+ <row>
19722
+ <entry>
19723
+ <literal><function>cfs_version()</function></literal>
19724
+ </entry>
19725
+ <entry><type>text</type></entry>
19726
+ <entry>Displays the CFS version and the specific compression algorithm used.
19727
+ </entry>
19728
+ </row>
19729
+ <row>
19730
+ <entry>
19731
+ <literal><function>cfs_estimate(rel regclass)</function></literal>
19732
+ </entry>
19733
+ <entry><type>float8</type></entry>
19734
+ <entry>Estimates the effect of table compression. Returns the average compression ratio for the first ten blocks of the relation.
19735
+ </entry>
19736
+ </row>
19737
+ <row>
19738
+ <entry>
19739
+ <literal><function>cfs_compression_ratio(rel regclass)</function></literal>
19740
+ </entry>
19741
+ <entry><type>float8</type></entry>
19742
+ <entry>Returns the actual compression ratio for all segments of the compressed relation.
19743
+ </entry>
19744
+ </row>
19745
+ <row>
19746
+ <entry>
19747
+ <literal><function>cfs_fragmentation(rel regclass)</function></literal>
19748
+ </entry>
19749
+ <entry><type>float8</type></entry>
19750
+ <entry>Returns the average fragmentation ratio of the relation files.
19751
+ </entry>
19752
+ </row>
19753
+ <row>
19754
+ <entry>
19755
+ <literal><function>cfs_gc_activity_processed_bytes()</function></literal>
19756
+ </entry>
19757
+ <entry><type>int64</type></entry>
19758
+ <entry>Returns the total size of pages processed by CFS during garbage collection.
19759
+ </entry>
19760
+ </row>
19761
+ <row>
19762
+ <entry>
19763
+ <literal><function>cfs_gc_activity_processed_pages()</function></literal>
19764
+ </entry>
19765
+ <entry><type>int64</type></entry>
19766
+ <entry>Returns the number of pages processed by CFS during garbage collection.
19767
+ </entry>
19768
+ </row>
19769
+ <row>
19770
+ <entry>
19771
+ <literal><function>cfs_gc_activity_processed_files()</function></literal>
19772
+ </entry>
19773
+ <entry><type>int64</type></entry>
19774
+ <entry>Returns the number of files compacted by CFS during garbage collection.
19775
+ </entry>
19776
+ </row>
19777
+ <row>
19778
+ <entry>
19779
+ <literal><function>cfs_gc_activity_scanned_files()</function></literal>
19780
+ </entry>
19781
+ <entry><type>int64</type></entry>
19782
+ <entry>Returns the number of files scanned by CFS during garbage collection.
19783
+ </entry>
19784
+ </row>
19785
+ </tbody>
19786
+ </tgroup>
19787
+ </table>
19788
+ </sect2>
19645
19789
</sect1>
19646
19790
19647
19791
<sect1 id="functions-trigger">
0 commit comments