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

Commit6c50bdd

Browse files
author
Liudmila Mantrova
committed
DOC: review for CFS gucs added infd195a0 commit
1 parentf3a0283 commit6c50bdd

File tree

2 files changed

+252
-0
lines changed

2 files changed

+252
-0
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7489,6 +7489,114 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
74897489
</sect2>
74907490
</sect1>
74917491

7492+
<sect1 id="runtime-config-cfs">
7493+
<title>Data Compression</title>
7494+
7495+
<variablelist>
7496+
7497+
<varlistentry id="guc-cfs-gc" xreflabel="cfs-gc">
7498+
<term><varname>cfs_gc</varname> (<type>boolean</type>)
7499+
<indexterm>
7500+
<primary><varname>cfs_gc</> configuration parameter</primary>
7501+
</indexterm>
7502+
</term>
7503+
<listitem>
7504+
<para>
7505+
Enables/disables background garbage collection of compressed pages.
7506+
Default: <literal>on</literal>
7507+
</para>
7508+
</listitem>
7509+
</varlistentry>
7510+
7511+
<varlistentry id="guc-cfs-encryption" xreflabel="cfs-encryption">
7512+
<term><varname>cfs_encryption</varname> (<type>boolean</type>)
7513+
<indexterm>
7514+
<primary><varname>cfs_encryption</> configuration parameter</primary>
7515+
</indexterm>
7516+
</term>
7517+
<listitem>
7518+
<para>
7519+
Enables/disables encryption of compressed pages.
7520+
Default: <literal>off</literal>
7521+
</para>
7522+
</listitem>
7523+
</varlistentry>
7524+
7525+
<varlistentry id="guc-cfs-gc-workers" xreflabel="cfs-gc-workers">
7526+
<term><varname>cfs_gc_workers</varname> (<type>integer</type>)
7527+
<indexterm>
7528+
<primary><varname>cfs_gc_workers</> configuration parameter</primary>
7529+
</indexterm>
7530+
</term>
7531+
<listitem>
7532+
<para>
7533+
Number of CFS background garbage collection workers.
7534+
Default: 1
7535+
</para>
7536+
</listitem>
7537+
</varlistentry>
7538+
7539+
<varlistentry id="guc-cfs-level" xreflabel="cfs-level">
7540+
<term><varname>cfs_level</varname> (<type>integer</type>)
7541+
<indexterm>
7542+
<primary><varname>cfs_level</> configuration parameter</primary>
7543+
</indexterm>
7544+
</term>
7545+
<listitem>
7546+
<para>
7547+
CFS compression level: 0 &mdash; no compression, 1 &mdash; maximal speed.
7548+
Other possible values depend on the specific compression algorithm used.
7549+
For example, 9 for <literal>zlib</literal> or 19 for <literal>zstd</literal>.
7550+
Default: 1
7551+
</para>
7552+
</listitem>
7553+
</varlistentry>
7554+
7555+
<varlistentry id="guc-cfs-gc-threshold" xreflabel="cfs-gc-threshold">
7556+
<term><varname>cfs_gc_threshold</varname> (<type>integer</type>)
7557+
<indexterm>
7558+
<primary><varname>cfs_gc_threshold</> configuration parameter</primary>
7559+
</indexterm>
7560+
</term>
7561+
<listitem>
7562+
<para>
7563+
Minimum percent of garbage blocks in the file required to start garbage collection.
7564+
Default: 50%
7565+
</para>
7566+
</listitem>
7567+
</varlistentry>
7568+
7569+
<varlistentry id="guc-cfs-gc-period" xreflabel="cfs-gc-period">
7570+
<term><varname>cfs_gc_period</varname> (<type>integer</type>)
7571+
<indexterm>
7572+
<primary><varname>cfs_gc_period</> configuration parameter</primary>
7573+
</indexterm>
7574+
</term>
7575+
<listitem>
7576+
<para>
7577+
Time interval between CFS garbage collection iterations, in milliseconds.
7578+
Default: 5 seconds
7579+
</para>
7580+
</listitem>
7581+
</varlistentry>
7582+
7583+
<varlistentry id="guc-cfs-gc-delay" xreflabel="cfs-gc-delay">
7584+
<term><varname>cfs_gc_delay</varname> (<type>integer</type>)
7585+
<indexterm>
7586+
<primary><varname>cfs_gc_delay</> configuration parameter</primary>
7587+
</indexterm>
7588+
</term>
7589+
<listitem>
7590+
<para>
7591+
Time interval for which garbage collection is paused after
7592+
each file defragmentation, in milliseconds.
7593+
Default: 0
7594+
</para>
7595+
</listitem>
7596+
</varlistentry>
7597+
</variablelist>
7598+
</sect1>
7599+
74927600
<sect1 id="runtime-config-error-handling">
74937601
<title>Error Handling</title>
74947602

‎doc/src/sgml/func.sgml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19641,7 +19641,151 @@ SELECT (pg_stat_file('filename')).modification;
1964119641
</para>
1964219642

1964319643
</sect2>
19644+
<sect2 id="functions-compression-control">
19645+
<title>Compression Control Functions</title>
1964419646

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>
1964519789
</sect1>
1964619790

1964719791
<sect1 id="functions-trigger">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp